src/Entity/Voucher.php line 10
<?php
namespace App\Entity;
use App\Repository\VoucherRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: VoucherRepository::class)]
class Voucher
{
const TYPE_LIMITED = 1;
const TYPE_UNLIMITED = 2;
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255)]
private ?string $code = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $label = null;
#[ORM\Column]
private ?bool $status = null;
#[ORM\Column(type: Types::SMALLINT)]
private ?int $type = null;
#[ORM\Column(type: Types::DECIMAL, precision: 10, scale: 2, nullable: true)]
private ?string $price = null;
#[ORM\Column]
private ?bool $used = null;
#[ORM\Column(type: 'datetime')]
private $createdAt;
#[ORM\Column(type: 'datetime', nullable: true)]
private $updatedAt;
#[ORM\ManyToOne(targetEntity: Inscription::class, inversedBy: 'vouchers')]
#[ORM\JoinColumn(nullable: true)]
private ?Inscription $inscription = null;
public function getId(): ?int
{
return $this->id;
}
public function getLabel(): ?string
{
return $this->label;
}
public function setLabel(string $label): self
{
$this->label = $label;
return $this;
}
public function getCode(): ?string
{
return $this->code;
}
public function setCode(string $code): self
{
$this->code = $code;
return $this;
}
public function isStatus(): ?bool
{
return $this->status;
}
public function setStatus(bool $status): self
{
$this->status = $status;
return $this;
}
public function getType(): ?int
{
return $this->type;
}
public function setType(int $type): self
{
$this->type = $type;
return $this;
}
public function getPrice(): ?string
{
return $this->price;
}
public function setPrice(?string $price): self
{
$this->price = $price;
return $this;
}
public function isUsed(): ?bool
{
return $this->used;
}
public function setUsed(bool $used): self
{
$this->used = $used;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getUpdatedAt(): ?\DateTimeInterface
{
return $this->updatedAt;
}
public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
{
$this->updatedAt = $updatedAt;
return $this;
}
public function getInscription(): ?Inscription
{
return $this->inscription;
}
public function setInscription(?Inscription $inscription): self
{
$this->inscription = $inscription;
return $this;
}
}