src/Entity/Gos/AdditionalAccess/AdditionalAccessBeneficiary.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gos\AdditionalAccess;
  3. use App\Entity\Gos\Coupon;
  4. use App\Entity\Gos\Orders;
  5. use App\Repository\Gos\AdditionalAccess\AdditionalAccessBeneficiaryRepository;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=AdditionalAccessBeneficiaryRepository::class)
  9.  * @ORM\HasLifecycleCallbacks
  10.  */
  11. class AdditionalAccessBeneficiary
  12. {
  13.     /**
  14.      * @ORM\Id
  15.      * @ORM\GeneratedValue
  16.      * @ORM\Column(type="integer")
  17.      */
  18.     private $id;
  19.     /**
  20.      * @ORM\ManyToOne(targetEntity=Orders::class, inversedBy="additionalAccessBeneficiaries")
  21.      * @ORM\JoinColumn(nullable=false)
  22.      */
  23.     private $orders;
  24.     /**
  25.      * @ORM\OneToOne(targetEntity=Coupon::class, cascade={"persist", "remove"})
  26.      * @ORM\JoinColumn(onDelete="SET NULL")
  27.      */
  28.     private $coupon;
  29.     /**
  30.      * @ORM\Column(type="string", length=255)
  31.      */
  32.     private $firstName;
  33.     /**
  34.      * @ORM\Column(type="string", length=255)
  35.      */
  36.     private $lastName;
  37.     /**
  38.      * @ORM\Column(type="string", length=255)
  39.      */
  40.     private $email;
  41.     /**
  42.      * @ORM\Column(type="string", length=255)
  43.      */
  44.     private $phoneNumber;
  45.     /**
  46.      * @ORM\Column(type="string", length=255)
  47.      */
  48.     private $position;
  49.     /**
  50.      * @ORM\Column(type="datetime")
  51.      */
  52.     private $createdAt;
  53.     /**
  54.      * @ORM\Column(type="datetime", nullable=true)
  55.      */
  56.     private $updatedAt;
  57.     /** @ORM\PrePersist() */
  58.     public function prePersist()
  59.     {
  60.         $this->createdAt = new \DateTime();
  61.     }
  62.     /** @ORM\PreUpdate() */
  63.     public function preUpdate()
  64.     {
  65.         $this->updatedAt = new \DateTime();
  66.     }
  67.     public function getId(): ?int
  68.     {
  69.         return $this->id;
  70.     }
  71.     public function getOrders(): ?Orders
  72.     {
  73.         return $this->orders;
  74.     }
  75.     public function setOrders(?Orders $orders): self
  76.     {
  77.         $this->orders $orders;
  78.         return $this;
  79.     }
  80.     public function getCoupon(): ?Coupon
  81.     {
  82.         return $this->coupon;
  83.     }
  84.     public function setCoupon(?Coupon $coupon): self
  85.     {
  86.         $this->coupon $coupon;
  87.         return $this;
  88.     }
  89.     public function getFirstName(): ?string
  90.     {
  91.         return $this->firstName;
  92.     }
  93.     public function setFirstName(string $firstName): self
  94.     {
  95.         $this->firstName $firstName;
  96.         return $this;
  97.     }
  98.     public function getLastName(): ?string
  99.     {
  100.         return $this->lastName;
  101.     }
  102.     public function setLastName(string $lastName): self
  103.     {
  104.         $this->lastName $lastName;
  105.         return $this;
  106.     }
  107.     public function getEmail(): ?string
  108.     {
  109.         return $this->email;
  110.     }
  111.     public function setEmail(string $email): self
  112.     {
  113.         $this->email $email;
  114.         return $this;
  115.     }
  116.     public function getPhoneNumber(): ?string
  117.     {
  118.         return $this->phoneNumber;
  119.     }
  120.     public function setPhoneNumber(string $phoneNumber): self
  121.     {
  122.         $this->phoneNumber $phoneNumber;
  123.         return $this;
  124.     }
  125.     public function getPosition(): ?string
  126.     {
  127.         return $this->position;
  128.     }
  129.     public function setPosition(string $position): self
  130.     {
  131.         $this->position $position;
  132.         return $this;
  133.     }
  134.     public function getCreatedAt(): ?\DateTimeInterface
  135.     {
  136.         return $this->createdAt;
  137.     }
  138.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  139.     {
  140.         $this->createdAt $createdAt;
  141.         return $this;
  142.     }
  143.     public function getUpdatedAt(): ?\DateTimeInterface
  144.     {
  145.         return $this->updatedAt;
  146.     }
  147.     public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
  148.     {
  149.         $this->updatedAt $updatedAt;
  150.         return $this;
  151.     }
  152. }