<?php
namespace App\Entity;
use App\Repository\ContactPersonPositionsRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
/**
* @deprecated use CorporateHierarchy instead
* TODO Replace this entity name with CorporateHierarchy
* @ORM\Entity(repositoryClass=ContactPersonPositionsRepository::class)
*/
class ContactPersonPositions
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
* @Groups({
* "project.details.orders",
* "order.detail",
*
* "project.details",
* "selectable.list",
* "contact.person.position.base",
*
* "contact_person_position@core",
* "contact_person_position@base"
* })
*/
private $id;
/**
* @ORM\OneToMany(targetEntity=ProjectOwnerContactPersons::class, mappedBy="position", orphanRemoval=true, cascade={"persist", "remove"})
*/
private $project_owner_contact_persons;
/**
* @ORM\OneToMany(targetEntity=SupplierContactPersons::class, mappedBy="position")
*/
private $supplierContactPersons;
/**
* @ORM\Column(type="string", length=64)
* @Groups({
* "project.details.orders",
* "order.detail",
*
* "project.details",
* "selectable.list",
* "contact.person.position.base",
*
* "contact_person_position@core",
* "contact_person_position@base"
* })
*/
private $name_en;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({
* "project.details.orders",
* "order.detail",
*
* "project.details",
* "selectable.list",
* "contact.person.position.base",
*
* "contact_person_position@core",
* "contact_person_position@base"
* })
*/
private $description_en;
/**
* @ORM\Column(type="string", length=64, nullable=true)
* @Groups({
* "project.details.orders",
* "order.detail",
*
* "project.details",
* "selectable.list",
* "contact.person.position.base",
*
* "contact_person_position@core",
* "contact_person_position@base"
* })
*/
private $name_de;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({
* "project.details.orders",
* "order.detail",
*
* "project.details",
* "selectable.list",
* "contact.person.position.base",
*
* "contact_person_position@core",
* "contact_person_position@base"
* })
*/
private $description_de;
/**
* @ORM\Column(type="string", length=64, nullable=true)
* @Groups({
* "project.details.orders",
* "order.detail",
*
* "project.details",
* "selectable.list",
* "contact.person.position.base",
*
* "contact_person_position@core",
* "contact_person_position@base"
* })
*/
private $name_tr;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({
* "project.details.orders",
* "order.detail",
*
* "project.details",
* "selectable.list",
* "contact.person.position.base",
*
* "contact_person_position@core",
* "contact_person_position@base"
* })
*/
private $description_tr;
public function __construct()
{
$this->project_owner_contact_persons = new ArrayCollection();
$this->supplierContactPersons = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
/**
* @return Collection<int, ProjectOwnerContactPersons>
*/
public function getProjectOwnerContactPersons(): Collection
{
return $this->project_owner_contact_persons;
}
public function addProjectOwnerContactPerson(ProjectOwnerContactPersons $projectOwnerContactPerson): self
{
if (!$this->project_owner_contact_persons->contains($projectOwnerContactPerson)) {
$this->project_owner_contact_persons[] = $projectOwnerContactPerson;
$projectOwnerContactPerson->setPosition($this);
}
return $this;
}
public function removeProjectOwnerContactPerson(ProjectOwnerContactPersons $projectOwnerContactPerson): self
{
if ($this->project_owner_contact_persons->removeElement($projectOwnerContactPerson)) {
// set the owning side to null (unless already changed)
if ($projectOwnerContactPerson->getPosition() === $this) {
$projectOwnerContactPerson->setPosition(null);
}
}
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): self
{
$this->description = $description;
return $this;
}
public function getNameEn(): ?string
{
return $this->name_en;
}
public function setNameEn(string $name_en): self
{
$this->name_en = $name_en;
return $this;
}
public function getDescriptionEn(): ?string
{
return $this->description_en;
}
public function setDescriptionEn(?string $description_en): self
{
$this->description_en = $description_en;
return $this;
}
public function getNameDe(): ?string
{
return $this->name_de;
}
public function setNameDe(?string $name_de): self
{
$this->name_de = $name_de;
return $this;
}
public function getDescriptionDe(): ?string
{
return $this->description_de;
}
public function setDescriptionDe(?string $description_de): self
{
$this->description_de = $description_de;
return $this;
}
public function getNameTr(): ?string
{
return $this->name_tr;
}
public function setNameTr(?string $name_tr): self
{
$this->name_tr = $name_tr;
return $this;
}
public function getDescriptionTr(): ?string
{
return $this->description_tr;
}
public function setDescriptionTr(?string $description_tr): self
{
$this->description_tr = $description_tr;
return $this;
}
}