<?phpnamespace App\Entity\Gos;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass="App\Repository\Gos\CouponAudiotekaRepository") * @ORM\HasLifecycleCallbacks */class CouponAudioteka{ /** * @var ?int * * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") */ protected ?int $id; /** * @var ?string * * @ORM\Column(type="string", length=8, unique=true) */ protected ?string $code; /** * @var ?string * * @ORM\Column(type="string") */ protected ?string $provider; /** * @ORM\OneToOne(targetEntity=OrderPart::class, inversedBy="audiotekaCoupon") * @ORM\JoinColumn(nullable=true) */ private $orderPart = null; /** * @var ?\DateTime * * @ORM\Column(type="datetime", nullable=true) */ private ?\DateTime $createdAt; /** * @var ?\DateTime * * @ORM\Column(type="datetime", nullable=true) */ private ?\DateTime $updatedAt; /** @ORM\PrePersist() */ public function prePersist(): void { $this->createdAt = new \DateTime(); } /** @ORM\PreUpdate() */ public function preUpdate(): void { $this->updatedAt = new \DateTime(); } public function getId(): int { return $this->id; } public function setCode(string $code): static { $this->code = $code; return $this; } public function getCode(): string { return $this->code; } public function getProvider(): ?string { return $this->provider; } public function setProvider(?string $provider): static { $this->provider = $provider; return $this; } public function getOrderPart(): ?OrderPart { return $this->orderPart; } public function setOrderPart($orderPart): static { $this->orderPart = $orderPart; return $this; } public function setCreatedAt(\DateTime $createdAt): static { $this->createdAt = $createdAt; return $this; } public function getCreatedAt(): \DateTime { return $this->createdAt; } public function setUpdatedAt(\DateTime $updatedAt): static { $this->updatedAt = $updatedAt; return $this; } public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; }}