mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-01-10 22:37:28 +01:00
44 lines
1.3 KiB
PHP
44 lines
1.3 KiB
PHP
<?php
|
|
namespace App\Entity;
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
use Doctrine\Common\Collections\ArrayCollection;
|
|
use App\Entity\Attribut\IdAttribut;
|
|
use App\Entity\Attribut\SourceAttribut;
|
|
use App\Entity\Attribut\ParentAttribut;
|
|
use App\Entity\Attribut\ChildsAttribut;
|
|
|
|
/**
|
|
*
|
|
* @author kevinfrantz
|
|
* @ORM\Table(name="node")
|
|
* @ORM\Entity(repositoryClass="App\Repository\NodeRepository")
|
|
*/
|
|
class Node implements NodeInterface
|
|
{
|
|
use IdAttribut,SourceAttribut, ParentAttribut, ChildsAttribut;
|
|
|
|
/**
|
|
* Many Nodes have many parents
|
|
* @ORM\ManyToMany(targetEntity="Node")
|
|
* @ORM\JoinTable(name="nodes_parents",
|
|
* joinColumns={@ORM\JoinColumn(name="node_id", referencedColumnName="id")},
|
|
* inverseJoinColumns={@ORM\JoinColumn(name="node_id", referencedColumnName="id")}
|
|
* )
|
|
* @var ArrayCollection|Node[]
|
|
*/
|
|
protected $parents;
|
|
|
|
/**
|
|
* Many Nodes have many childs
|
|
* @ORM\ManyToMany(targetEntity="Node")
|
|
* @ORM\JoinTable(name="nodes_childs",
|
|
* joinColumns={@ORM\JoinColumn(name="node_id", referencedColumnName="id")},
|
|
* inverseJoinColumns={@ORM\JoinColumn(name="node_id", referencedColumnName="id")}
|
|
* )
|
|
* @var ArrayCollection|Node[]
|
|
*/
|
|
protected $childs;
|
|
}
|
|
|