src/Entity/Voucher.php line 10

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\VoucherRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassVoucherRepository::class)]
  7. class Voucher
  8. {
  9.     const TYPE_LIMITED 1;
  10.     const TYPE_UNLIMITED 2;
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(length255)]
  16.     private ?string $code null;
  17.     #[ORM\Column(length255nullabletrue)]
  18.     private ?string $label null;
  19.     #[ORM\Column]
  20.     private ?bool $status null;
  21.     #[ORM\Column(typeTypes::SMALLINT)]
  22.     private ?int $type null;
  23.     #[ORM\Column(typeTypes::DECIMALprecision10scale2nullabletrue)]
  24.     private ?string $price null;
  25.     #[ORM\Column]
  26.     private ?bool $used null;
  27.     #[ORM\Column(type'datetime')]
  28.     private $createdAt;
  29.     #[ORM\Column(type'datetime'nullabletrue)]
  30.     private $updatedAt;
  31.     #[ORM\ManyToOne(targetEntityInscription::class, inversedBy'vouchers')]
  32.     #[ORM\JoinColumn(nullabletrue)]
  33.     private ?Inscription $inscription null;
  34.     public function getId(): ?int
  35.     {
  36.         return $this->id;
  37.     }
  38.     public function getLabel(): ?string
  39.     {
  40.         return $this->label;
  41.     }
  42.     public function setLabel(string $label): self
  43.     {
  44.         $this->label $label;
  45.         return $this;
  46.     }
  47.     public function getCode(): ?string
  48.     {
  49.         return $this->code;
  50.     }
  51.     public function setCode(string $code): self
  52.     {
  53.         $this->code $code;
  54.         return $this;
  55.     }
  56.     public function isStatus(): ?bool
  57.     {
  58.         return $this->status;
  59.     }
  60.     public function setStatus(bool $status): self
  61.     {
  62.         $this->status $status;
  63.         return $this;
  64.     }
  65.     public function getType(): ?int
  66.     {
  67.         return $this->type;
  68.     }
  69.     public function setType(int $type): self
  70.     {
  71.         $this->type $type;
  72.         return $this;
  73.     }
  74.     public function getPrice(): ?string
  75.     {
  76.         return $this->price;
  77.     }
  78.     public function setPrice(?string $price): self
  79.     {
  80.         $this->price $price;
  81.         return $this;
  82.     }
  83.     public function isUsed(): ?bool
  84.     {
  85.         return $this->used;
  86.     }
  87.     public function setUsed(bool $used): self
  88.     {
  89.         $this->used $used;
  90.         return $this;
  91.     }
  92.     public function getCreatedAt(): ?\DateTimeInterface
  93.     {
  94.         return $this->createdAt;
  95.     }
  96.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  97.     {
  98.         $this->createdAt $createdAt;
  99.         return $this;
  100.     }
  101.     public function getUpdatedAt(): ?\DateTimeInterface
  102.     {
  103.         return $this->updatedAt;
  104.     }
  105.     public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
  106.     {
  107.         $this->updatedAt $updatedAt;
  108.         return $this;
  109.     }
  110.     public function getInscription(): ?Inscription
  111.     {
  112.         return $this->inscription;
  113.     }
  114.     public function setInscription(?Inscription $inscription): self
  115.     {
  116.         $this->inscription $inscription;
  117.         return $this;
  118.     }
  119. }