src/Entity/Department.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * @ORM\Entity(repositoryClass="App\Repository\DepartmentRepository")
  6.  */
  7. class Department
  8. {
  9.     /**
  10.      * @ORM\Id()
  11.      * @ORM\GeneratedValue()
  12.      * @ORM\Column(type="integer")
  13.      */
  14.     private $id;
  15.     /**
  16.      * @ORM\Column(type="string", length=255)
  17.      */
  18.     private $name;
  19.     /**
  20.      * @ORM\ManyToOne(targetEntity=Company::class, inversedBy="departments")
  21.      * @ORM\JoinColumn(nullable=true)
  22.      */
  23.     private $company=null;
  24.     /**
  25.      * @ORM\Column(type="string", length=255, nullable=true)
  26.      */
  27.     private $parent null;
  28.     public function getId(): ?int
  29.     {
  30.         return $this->id;
  31.     }
  32.     public function getName(): ?string
  33.     {
  34.         return $this->name;
  35.     }
  36.     public function setName(string $name): self
  37.     {
  38.         $this->name $name;
  39.         return $this;
  40.     }
  41.     public function getCompany(): ?Company
  42.     {
  43.         return $this->company;
  44.     }
  45.     public function setCompany(?Company $company): self
  46.     {
  47.         $this->company $company;
  48.         return $this;
  49.     }
  50.     /**
  51.      * @return mixed
  52.      */
  53.     public function getParent()
  54.     {
  55.         return $this->parent;
  56.     }
  57.     /**
  58.      * @param mixed $parent
  59.      */
  60.     public function setParent($parent): void
  61.     {
  62.         $this->parent $parent;
  63.     }
  64. }