src/Entity/ContactPersonPositions.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ContactPersonPositionsRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Component\Serializer\Annotation\Groups;
  8. /**
  9.  * @deprecated use CorporateHierarchy instead
  10.  * TODO Replace this entity name with CorporateHierarchy
  11.  * @ORM\Entity(repositoryClass=ContactPersonPositionsRepository::class)
  12.  */
  13. class ContactPersonPositions
  14. {
  15.     /**
  16.      * @ORM\Id
  17.      * @ORM\GeneratedValue
  18.      * @ORM\Column(type="integer")
  19.      * @Groups({
  20.      *     "project.details.orders",
  21.      *     "order.detail",
  22.      *
  23.      *     "project.details",
  24.      *     "selectable.list",
  25.      *     "contact.person.position.base",
  26.      *
  27.      *     "contact_person_position@core",
  28.      *     "contact_person_position@base"
  29.      *   })
  30.      */
  31.     private $id;
  32.     /**
  33.      * @ORM\OneToMany(targetEntity=ProjectOwnerContactPersons::class, mappedBy="position", orphanRemoval=true, cascade={"persist", "remove"})
  34.      */
  35.     private $project_owner_contact_persons;
  36.     /**
  37.      * @ORM\OneToMany(targetEntity=SupplierContactPersons::class, mappedBy="position")
  38.      */
  39.     private $supplierContactPersons;
  40.     /**
  41.      * @ORM\Column(type="string", length=64)
  42.      * @Groups({
  43.      *     "project.details.orders",
  44.      *     "order.detail",
  45.      *
  46.      *     "project.details",
  47.      *     "selectable.list",
  48.      *     "contact.person.position.base",
  49.      *
  50.      *     "contact_person_position@core",
  51.      *     "contact_person_position@base"
  52.      * })
  53.      */
  54.     private $name_en;
  55.     /**
  56.      * @ORM\Column(type="string", length=255, nullable=true)
  57.      * @Groups({
  58.      *      "project.details.orders",
  59.      *      "order.detail",
  60.      *
  61.      *      "project.details",
  62.      *      "selectable.list",
  63.      *      "contact.person.position.base",
  64.      *
  65.      *      "contact_person_position@core",
  66.      *      "contact_person_position@base"
  67.      *  })
  68.      */
  69.     private $description_en;
  70.     /**
  71.      * @ORM\Column(type="string", length=64, nullable=true)
  72.      * @Groups({
  73.      *       "project.details.orders",
  74.      *       "order.detail",
  75.      *
  76.      *       "project.details",
  77.      *       "selectable.list",
  78.      *       "contact.person.position.base",
  79.      *
  80.      *       "contact_person_position@core",
  81.      *       "contact_person_position@base"
  82.      *   })
  83.      */
  84.     private $name_de;
  85.     /**
  86.      * @ORM\Column(type="string", length=255, nullable=true)
  87.      * @Groups({
  88.      *      "project.details.orders",
  89.      *      "order.detail",
  90.      *
  91.      *      "project.details",
  92.      *      "selectable.list",
  93.      *      "contact.person.position.base",
  94.      *
  95.      *      "contact_person_position@core",
  96.      *      "contact_person_position@base"
  97.      *  })
  98.      */
  99.     private $description_de;
  100.     /**
  101.      * @ORM\Column(type="string", length=64, nullable=true)
  102.      * @Groups({
  103.      *      "project.details.orders",
  104.      *      "order.detail",
  105.      *
  106.      *      "project.details",
  107.      *      "selectable.list",
  108.      *      "contact.person.position.base",
  109.      *
  110.      *      "contact_person_position@core",
  111.      *      "contact_person_position@base"
  112.      *  })
  113.      */
  114.     private $name_tr;
  115.     /**
  116.      * @ORM\Column(type="string", length=255, nullable=true)
  117.      * @Groups({
  118.      *      "project.details.orders",
  119.      *      "order.detail",
  120.      *
  121.      *      "project.details",
  122.      *      "selectable.list",
  123.      *      "contact.person.position.base",
  124.      *
  125.      *      "contact_person_position@core",
  126.      *      "contact_person_position@base"
  127.      *  })
  128.      */
  129.     private $description_tr;
  130.     public function __construct()
  131.     {
  132.         $this->project_owner_contact_persons = new ArrayCollection();
  133.         $this->supplierContactPersons = new ArrayCollection();
  134.     }
  135.     public function getId(): ?int
  136.     {
  137.         return $this->id;
  138.     }
  139.     /**
  140.      * @return Collection<int, ProjectOwnerContactPersons>
  141.      */
  142.     public function getProjectOwnerContactPersons(): Collection
  143.     {
  144.         return $this->project_owner_contact_persons;
  145.     }
  146.     public function addProjectOwnerContactPerson(ProjectOwnerContactPersons $projectOwnerContactPerson): self
  147.     {
  148.         if (!$this->project_owner_contact_persons->contains($projectOwnerContactPerson)) {
  149.             $this->project_owner_contact_persons[] = $projectOwnerContactPerson;
  150.             $projectOwnerContactPerson->setPosition($this);
  151.         }
  152.         return $this;
  153.     }
  154.     public function removeProjectOwnerContactPerson(ProjectOwnerContactPersons $projectOwnerContactPerson): self
  155.     {
  156.         if ($this->project_owner_contact_persons->removeElement($projectOwnerContactPerson)) {
  157.             // set the owning side to null (unless already changed)
  158.             if ($projectOwnerContactPerson->getPosition() === $this) {
  159.                 $projectOwnerContactPerson->setPosition(null);
  160.             }
  161.         }
  162.         return $this;
  163.     }
  164.     public function getDescription(): ?string
  165.     {
  166.         return $this->description;
  167.     }
  168.     public function setDescription(?string $description): self
  169.     {
  170.         $this->description $description;
  171.         return $this;
  172.     }
  173.     public function getNameEn(): ?string
  174.     {
  175.         return $this->name_en;
  176.     }
  177.     public function setNameEn(string $name_en): self
  178.     {
  179.         $this->name_en $name_en;
  180.         return $this;
  181.     }
  182.     public function getDescriptionEn(): ?string
  183.     {
  184.         return $this->description_en;
  185.     }
  186.     public function setDescriptionEn(?string $description_en): self
  187.     {
  188.         $this->description_en $description_en;
  189.         return $this;
  190.     }
  191.     public function getNameDe(): ?string
  192.     {
  193.         return $this->name_de;
  194.     }
  195.     public function setNameDe(?string $name_de): self
  196.     {
  197.         $this->name_de $name_de;
  198.         return $this;
  199.     }
  200.     public function getDescriptionDe(): ?string
  201.     {
  202.         return $this->description_de;
  203.     }
  204.     public function setDescriptionDe(?string $description_de): self
  205.     {
  206.         $this->description_de $description_de;
  207.         return $this;
  208.     }
  209.     public function getNameTr(): ?string
  210.     {
  211.         return $this->name_tr;
  212.     }
  213.     public function setNameTr(?string $name_tr): self
  214.     {
  215.         $this->name_tr $name_tr;
  216.         return $this;
  217.     }
  218.     public function getDescriptionTr(): ?string
  219.     {
  220.         return $this->description_tr;
  221.     }
  222.     public function setDescriptionTr(?string $description_tr): self
  223.     {
  224.         $this->description_tr $description_tr;
  225.         return $this;
  226.     }
  227. }