src/Entity/SupplierContactPersons.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\SupplierContactPersonsRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Serializer\Annotation\Groups;
  6. /**
  7.  * @ORM\Entity(repositoryClass=SupplierContactPersonsRepository::class)
  8.  */
  9. class SupplierContactPersons
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      * @Groups({
  16.      *     "supplier_contact_person@core",
  17.      *     "supplier_contact_person@ref"
  18.      * })
  19.      */
  20.     private $id;
  21.     /**
  22.      * @ORM\ManyToOne(targetEntity=Suppliers::class, inversedBy="supplier_contact_persons")
  23.      * @ORM\JoinColumn(nullable=false)
  24.      */
  25.     private $supplier;
  26.     /**
  27.      * @ORM\Column(type="string", length=64, nullable=true)
  28.      * @Groups({
  29.      *     "supplier_contact_person@core",
  30.      *     "supplier_contact_person@ref"
  31.      * })
  32.      */
  33.     private $name;
  34.     /**
  35.      * @ORM\Column(type="string", length=64, nullable=true)
  36.      * @Groups({
  37.      *     "supplier_contact_person@core",
  38.      *     "supplier_contact_person@ref"
  39.      * })
  40.      */
  41.     private $surname;
  42.     /**
  43.      * @ORM\Column(type="string", length=64, nullable=true)
  44.      * @Groups({
  45.      *     "supplier_contact_person@core"
  46.      * })
  47.      */
  48.     private $tel;
  49.     /**
  50.      * @ORM\Column(type="string", length=255, nullable=true)
  51.      * @Groups({
  52.      *     "supplier_contact_person@core"
  53.      * })
  54.      */
  55.     private $email;
  56.     /**
  57.      * @ORM\ManyToOne(targetEntity=ContactPersonPositions::class, inversedBy="supplierContactPersons")
  58.      * @ORM\JoinColumn(nullable=true)
  59.      * @Groups({
  60.      *     "supplier_contact_person@core",
  61.      *     "supplier_contact_person@positions"
  62.      * })
  63.      */
  64.     private $position;
  65.     public function getId(): ?int
  66.     {
  67.         return $this->id;
  68.     }
  69.     public function getSupplier(): ?Suppliers
  70.     {
  71.         return $this->supplier;
  72.     }
  73.     public function setSupplier(?Suppliers $supplier): self
  74.     {
  75.         $this->supplier $supplier;
  76.         return $this;
  77.     }
  78.     public function getName(): ?string
  79.     {
  80.         return $this->name;
  81.     }
  82.     public function setName(?string $name): self
  83.     {
  84.         $this->name $name;
  85.         return $this;
  86.     }
  87.     public function getSurname(): ?string
  88.     {
  89.         return $this->surname;
  90.     }
  91.     public function setSurname(?string $surname): self
  92.     {
  93.         $this->surname $surname;
  94.         return $this;
  95.     }
  96.     public function getTel(): ?string
  97.     {
  98.         return $this->tel;
  99.     }
  100.     public function setTel(?string $tel): self
  101.     {
  102.         $this->tel $tel;
  103.         return $this;
  104.     }
  105.     public function getEmail(): ?string
  106.     {
  107.         return $this->email;
  108.     }
  109.     public function setEmail(?string $email): self
  110.     {
  111.         $this->email $email;
  112.         return $this;
  113.     }
  114.     public function getPosition(): ?ContactPersonPositions
  115.     {
  116.         return $this->position;
  117.     }
  118.     public function setPosition(?ContactPersonPositions $position): self
  119.     {
  120.         $this->position $position;
  121.         return $this;
  122.     }
  123. }