<?phpnamespace App\Entity;use App\Repository\WoltCouponRepository;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\Serializer\Annotation\Groups;/** * @ORM\Entity(repositoryClass=WoltCouponRepository::class) */class WoltCoupon{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") * @Groups({"WoltCouponList"}) */ private $id; /** * @ORM\Column(type="string", length=255, nullable=true) * @Groups({"WoltCouponList"}) */ private $code; /** * @ORM\Column(type="boolean", nullable=true) * @Groups({"WoltCouponList"}) */ private $used = false; /** * @ORM\Column(type="datetime", nullable=true) * @Groups({"WoltCouponList"}) */ private $dateAdd; /** * @ORM\ManyToOne(targetEntity=Teacher::class, inversedBy="woltCoupons") * @Groups({"WoltCouponList"}) */ private $teacher; /** * @ORM\Column(type="datetime", nullable=true) * @Groups({"WoltCouponList"}) */ private $usedAt; /** * @ORM\Column(type="datetime", nullable=true) * @Groups({"WoltCouponList"}) */ private $validTo; public function __construct() { $this->dateAdd = new \DateTime(); } public function getId(): ?int { return $this->id; } public function getCode(): ?string { return $this->code; } public function setCode(?string $code): self { $this->code = $code; return $this; } public function isUsed(): ?bool { return $this->used; } public function setUsed(?bool $used): self { $this->used = $used; return $this; } public function getDateAdd(): ?\DateTimeInterface { return $this->dateAdd; } public function setDateAdd(?\DateTimeInterface $dateAdd): self { $this->dateAdd = $dateAdd; return $this; } public function getTeacher(): ?Teacher { return $this->teacher; } public function setTeacher(?Teacher $teacher): self { $this->teacher = $teacher; return $this; } public function getUsedAt(): ?\DateTimeInterface { return $this->usedAt; } public function setUsedAt(?\DateTimeInterface $usedAt): self { $this->usedAt = $usedAt; return $this; } public function getValidTo(): ?\DateTimeInterface { return $this->validTo; } public function setValidTo(?\DateTimeInterface $validTo): self { $this->validTo = $validTo; return $this; }}