src/Entity/Gos/Omnibus.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gos;
  3. use App\Repository\Gos\OmnibusTableRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass="App\Repository\OmnibusRepository")
  7.  * @ORM\HasLifecycleCallbacks
  8.  */
  9. class Omnibus
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\ManyToOne(targetEntity=ProductVariant::class, inversedBy="omnibus")
  19.      * @ORM\JoinColumn(nullable=true)
  20.      */
  21.     private $productVariant;
  22.     /**
  23.      * @ORM\ManyToOne(targetEntity=ProductPack::class, inversedBy="omnibus")
  24.      * @ORM\JoinColumn(nullable=true)
  25.      */
  26.     private $productPack;
  27.     /**
  28.      * @ORM\Column(type="json")
  29.      */
  30.     private $couponsData = [];
  31.     /**
  32.      * @ORM\Column(type="date")
  33.      */
  34.     private $createdAt;
  35.     /** @ORM\PrePersist() */
  36.     public function prePersist()
  37.     {
  38.         $this->createdAt = new \DateTime();
  39.     }
  40.     public function getId(): ?int
  41.     {
  42.         return $this->id;
  43.     }
  44.     public function getProductVariant(): ?ProductVariant
  45.     {
  46.         return $this->productVariant;
  47.     }
  48.     public function setProductVariant(?ProductVariant $productVariant): self
  49.     {
  50.         $this->productVariant $productVariant;
  51.         return $this;
  52.     }
  53.     public function getProductPack(): ?ProductPack
  54.     {
  55.         return $this->productPack;
  56.     }
  57.     public function setProductPack(?ProductPack $productPack): self
  58.     {
  59.         $this->productPack $productPack;
  60.         return $this;
  61.     }
  62.     public function getCouponsData(): ?array
  63.     {
  64.         return $this->couponsData;
  65.     }
  66.     public function setCouponsData(array $couponsData): self
  67.     {
  68.         $this->couponsData $couponsData;
  69.         return $this;
  70.     }
  71.     public function getCreatedAt(): ?\DateTimeInterface
  72.     {
  73.         return $this->createdAt;
  74.     }
  75.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  76.     {
  77.         $this->createdAt $createdAt;
  78.         return $this;
  79.     }
  80. }