<?phpnamespace App\Entity;use App\Repository\CertificatRepository;use Doctrine\DBAL\Types\Types;use Symfony\Component\HttpFoundation\File\File;use Vich\UploaderBundle\Mapping\Annotation as Vich;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\Validator\Constraints as Assert;#[ORM\Entity(repositoryClass: CertificatRepository::class)]#[Vich\Uploadable]class Certificat{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(length: 255, nullable: true)] #[Assert\NotBlank (message:"Le champ Libellé ne peut pas être vide.")] private ?string $wording = null; #[ORM\Column(length: 255, nullable: true)] private ?string $fileName = null; #[Vich\UploadableField(mapping: 'certificat', fileNameProperty: 'fileName')] private ?File $file = null; #[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)] #[Assert\NotBlank (message:"Le Libellé ne peut pas être vide.")] private ?\DateTimeInterface $dateObtention = null; #[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)] #[Assert\NotBlank (message:"Le Libellé ne peut pas être vide.")] private ?\DateTimeInterface $dateFinValidite = null; #[ORM\ManyToOne(inversedBy: 'certificats')] #[Assert\NotBlank (message:"Le Libellé ne peut pas être vide.")] private ?User $user = null; public function getId(): ?int { return $this->id; } public function setFile(File $file = null) { $this->file = $file; } public function getFile() { return $this->file; } public function getWording(): ?string { return $this->wording; } public function __toString() { return $this->wording; } public function setWording(?string $wording): self { $this->wording = $wording; return $this; } public function getFileName(): ?string { return $this->fileName; } public function setFileName(?string $fileName): self { $this->fileName = $fileName; return $this; } public function getDateObtention(): ?\DateTimeInterface { return $this->dateObtention; } public function setDateObtention(?\DateTimeInterface $dateObtention): self { $this->dateObtention = $dateObtention; return $this; } public function getDateFinValidite(): ?\DateTimeInterface { return $this->dateFinValidite; } public function setDateFinValidite( ?\DateTimeInterface $dateFinValidite ): self { $this->dateFinValidite = $dateFinValidite; return $this; } public function getUser(): ?User { return $this->user; } public function setUser(?User $user): self { $this->user = $user; return $this; }}