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.      */
  20.     private $productVariant;
  21.     /**
  22.      * @ORM\Column(type="json")
  23.      */
  24.     private $couponsData = [];
  25.     /**
  26.      * @ORM\Column(type="date")
  27.      */
  28.     private $createdAt;
  29.     /** @ORM\PrePersist() */
  30.     public function prePersist()
  31.     {
  32.         $this->createdAt = new \DateTime();
  33.     }
  34.     public function getId(): ?int
  35.     {
  36.         return $this->id;
  37.     }
  38.     public function getProductVariant(): ?ProductVariant
  39.     {
  40.         return $this->productVariant;
  41.     }
  42.     public function setProductVariant(?ProductVariant $productVariant): self
  43.     {
  44.         $this->productVariant $productVariant;
  45.         return $this;
  46.     }
  47.     public function getCouponsData(): ?array
  48.     {
  49.         return $this->couponsData;
  50.     }
  51.     public function setCouponsData(array $couponsData): self
  52.     {
  53.         $this->couponsData $couponsData;
  54.         return $this;
  55.     }
  56.     public function getCreatedAt(): ?\DateTimeInterface
  57.     {
  58.         return $this->createdAt;
  59.     }
  60.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  61.     {
  62.         $this->createdAt $createdAt;
  63.         return $this;
  64.     }
  65. }