src/Entity/Gos/CouponAudioteka.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gos;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * @ORM\Entity(repositoryClass="App\Repository\Gos\CouponAudiotekaRepository")
  6.  * @ORM\HasLifecycleCallbacks
  7.  */
  8. class CouponAudioteka
  9. {
  10.     /**
  11.      * @var ?int
  12.      *
  13.      * @ORM\Column(name="id", type="integer")
  14.      * @ORM\Id
  15.      * @ORM\GeneratedValue(strategy="AUTO")
  16.      */
  17.     protected ?int $id;
  18.     /**
  19.      * @var ?string
  20.      *
  21.      * @ORM\Column(type="string", length=8, unique=true)
  22.      */
  23.     protected ?string $code;
  24.     /**
  25.      * @var ?string
  26.      *
  27.      * @ORM\Column(type="string")
  28.      */
  29.     protected ?string $provider;
  30.     /**
  31.      * @ORM\OneToOne(targetEntity=OrderPart::class, inversedBy="audiotekaCoupon")
  32.      * @ORM\JoinColumn(nullable=true)
  33.      */
  34.     private $orderPart null;
  35.     /**
  36.      * @var ?\DateTime
  37.      *
  38.      * @ORM\Column(type="datetime", nullable=true)
  39.      */
  40.     private ?\DateTime $createdAt;
  41.     /**
  42.      * @var ?\DateTime
  43.      *
  44.      * @ORM\Column(type="datetime", nullable=true)
  45.      */
  46.     private ?\DateTime $updatedAt;
  47.     /** @ORM\PrePersist() */
  48.     public function prePersist(): void
  49.     {
  50.         $this->createdAt = new \DateTime();
  51.     }
  52.     /** @ORM\PreUpdate() */
  53.     public function preUpdate(): void
  54.     {
  55.         $this->updatedAt = new \DateTime();
  56.     }
  57.     public function getId(): int
  58.     {
  59.         return $this->id;
  60.     }
  61.     public function setCode(string $code): static
  62.     {
  63.         $this->code $code;
  64.         return $this;
  65.     }
  66.     public function getCode(): string
  67.     {
  68.         return $this->code;
  69.     }
  70.     public function getProvider(): ?string
  71.     {
  72.         return $this->provider;
  73.     }
  74.     public function setProvider(?string $provider): static
  75.     {
  76.         $this->provider $provider;
  77.         return $this;
  78.     }
  79.     public function getOrderPart(): ?OrderPart
  80.     {
  81.         return $this->orderPart;
  82.     }
  83.     public function setOrderPart($orderPart): static
  84.     {
  85.         $this->orderPart $orderPart;
  86.         return $this;
  87.     }
  88.     public function setCreatedAt(\DateTime $createdAt): static
  89.     {
  90.         $this->createdAt $createdAt;
  91.         return $this;
  92.     }
  93.     public function getCreatedAt(): \DateTime
  94.     {
  95.         return $this->createdAt;
  96.     }
  97.     public function setUpdatedAt(\DateTime $updatedAt): static
  98.     {
  99.         $this->updatedAt $updatedAt;
  100.         return $this;
  101.     }
  102.     public function getUpdatedAt(): ?\DateTime
  103.     {
  104.         return $this->updatedAt;
  105.     }
  106. }