src/Entity/ProjectOwnerContactPersons.php line 19

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ProjectOwnerContactPersonsRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  6. use Symfony\Component\Serializer\Annotation\Groups;
  7. /**
  8.  * TODO ReadMe!
  9.  * @deprecated replace this name with Collaborator
  10.  * @ORM\Entity(repositoryClass=ProjectOwnerContactPersonsRepository::class)
  11.  * @UniqueEntity(
  12.  *      fields={"project_owner", "name", "surname"},
  13.  *      message="Collaborator already registered|Collaborator with combination %s %s %s is already registered"
  14.  *  )
  15.  */
  16. class ProjectOwnerContactPersons
  17. {
  18.     /**
  19.      * @ORM\Id
  20.      * @ORM\GeneratedValue
  21.      * @ORM\Column(type="integer")
  22.      * @Groups({
  23.      *     "project.details.orders",
  24.      *     "order.detail",
  25.      *
  26.      *     "project.details",
  27.      *     "contact.person.base",
  28.      *
  29.      *
  30.      *     "contact_person@ref",
  31.      *     "contact_person@core"
  32.      * })
  33.      */
  34.     private $id;
  35.     /**
  36.      * @ORM\ManyToOne(targetEntity=ProjectOwner::class, inversedBy="projectOwnerContactPersons")
  37.      * @ORM\JoinColumn(nullable=false)
  38.      */
  39.     private $project_owner;
  40.     /**
  41.      * @ORM\Column(type="string", length=64, nullable=true)
  42.      * @Groups({
  43.      *     "project.details.orders",
  44.      *     "order.detail",
  45.      *     "project.details",
  46.      *     "contact.person.base",
  47.      *
  48.      *     "contact_person@ref",
  49.      *     "contact_person@core"
  50.      * })
  51.      */
  52.     private $name;
  53.     /**
  54.      * @ORM\Column(type="string", length=64, nullable=true)
  55.      * @Groups({
  56.      *     "project.details.orders",
  57.      *     "order.detail",
  58.      *
  59.      *     "project.details",
  60.      *     "contact.person.base",
  61.      *
  62.      *     "contact_person@ref",
  63.      *     "contact_person@core"
  64.      * })
  65.      */
  66.     private $surname;
  67.     /**
  68.      * @ORM\Column(type="string", length=64, nullable=true)
  69.      * @Groups({
  70.      *     "project.details.orders",
  71.      *     "order.detail",
  72.      *     "project.details",
  73.      *     "contact.person.base",
  74.      *
  75.      *     "contact_person@ref",
  76.      *     "contact_person@core"
  77.      *   })
  78.      */
  79.     private $tel;
  80.     /**
  81.      * @ORM\Column(type="string", length=255, nullable=true)
  82.      * @Groups({
  83.      *     "project.details.orders",
  84.      *      "order.detail",
  85.      *      "project.details",
  86.      *      "contact.person.base",
  87.      *
  88.      *      "contact_person@core"
  89.      *   })
  90.      */
  91.     private $email;
  92.     /**
  93.      * @ORM\ManyToOne(targetEntity=ContactPersonPositions::class, inversedBy="projectOwnerContactPersons")
  94.      * @ORM\JoinColumn(nullable=false)
  95.      * @Groups({
  96.      *      "project.details.orders",
  97.      *       "order.detail",
  98.      *       "project.details",
  99.      *       "contact.person.base",
  100.      *
  101.      *       "contact_person@positions"
  102.      *    })
  103.      */
  104.     private $position;
  105.     public function getId(): ?int
  106.     {
  107.         return $this->id;
  108.     }
  109.     public function getProjectOwner(): ?ProjectOwner
  110.     {
  111.         return $this->project_owner;
  112.     }
  113.     public function setProjectOwner(?ProjectOwner $project_owner): self
  114.     {
  115.         $this->project_owner $project_owner;
  116.         return $this;
  117.     }
  118.     public function getName(): ?string
  119.     {
  120.         return $this->name;
  121.     }
  122.     public function setName(?string $name): self
  123.     {
  124.         $this->name $name;
  125.         return $this;
  126.     }
  127.     public function getSurname(): ?string
  128.     {
  129.         return $this->surname;
  130.     }
  131.     public function setSurname(?string $surname): self
  132.     {
  133.         $this->surname $surname;
  134.         return $this;
  135.     }
  136.     public function getTel(): ?string
  137.     {
  138.         return $this->tel;
  139.     }
  140.     public function setTel(?string $tel): self
  141.     {
  142.         $this->tel $tel;
  143.         return $this;
  144.     }
  145.     public function getEmail(): ?string
  146.     {
  147.         return $this->email;
  148.     }
  149.     public function setEmail(?string $email): self
  150.     {
  151.         $this->email $email;
  152.         return $this;
  153.     }
  154.     public function getPosition(): ?ContactPersonPositions
  155.     {
  156.         return $this->position;
  157.     }
  158.     public function setPosition(?ContactPersonPositions $position): self
  159.     {
  160.         $this->position $position;
  161.         return $this;
  162.     }
  163. }