src/Entity/Code.php line 12
<?php
namespace App\Entity;
use App\Entity\Traits\TimestampableTrait;
use App\Repository\CodeRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\HttpFoundation\File\File;
use Vich\UploaderBundle\Entity\File as EmbeddedFile;
#[ORM\Entity(repositoryClass: CodeRepository::class)]
class Code
{
const LOT_LABELS = [
'PAL01' => 'Cave à vin',
'PAL02' => "Bon d'achat de 50€",
'PAL03' => 'Cours de cuisine',
'PAL04' => 'Webcoupon',
];
use TimestampableTrait;
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 30, unique: true)]
private ?string $code = null;
#[ORM\Column(nullable: true)]
private ?\DateTimeImmutable $usedAt = null;
#[ORM\Column(options: ['default' => false])]
private bool $burned = false;
private ?string $file = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $palier = null;
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 getUsedAt(): ?\DateTimeImmutable
{
return $this->usedAt;
}
public function setUsedAt(\DateTimeImmutable $usedAt): self
{
$this->usedAt = $usedAt;
return $this;
}
public function isBurned(): bool
{
return $this->burned;
}
public function setBurned(bool $burned): Code
{
$this->burned = $burned;
return $this;
}
public function getFile(): ?string
{
return $this->file;
}
public function setFile(?string $file): Code
{
$this->file = $file;
return $this;
}
public function getPalier(): ?string
{
return $this->palier;
}
public function setPalier(?string $palier): static
{
$this->palier = $palier;
return $this;
}
}