Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
proc
/
212
/
root
/
proc
/
self
/
root
/
proc
/
212
/
root
/
proc
/
self
/
root
/
proc
/
70528
/
cwd
/
src
/
Entity
/
//proc/212/root/proc/self/root/proc/212/root/proc/self/root/proc/70528/cwd/src/Entity/DbModel.php
<?php namespace App\Entity; use Doctrine\ORM\Mapping as ORM; use App\Repository\DbModelRepository; use Symfony\Component\HttpFoundation\File\File; use Symfony\Component\Validator\Constraints as Assert; use Vich\UploaderBundle\Mapping\Annotation as Vich; use Symfony\Component\HttpFoundation\File\UploadedFile; /** * @ORM\Entity(repositoryClass=DbModelRepository::class) * @Vich\Uploadable */ class DbModel { /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) * * @var string|null */ private $fileName; /** * NOTE: This is not a mapped field of entity metadata, just a simple property. * * @Vich\UploadableField(mapping="db_model", fileNameProperty="fileName") * @Assert\File( * maxSize = "10048k", * mimeTypes = {"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}, * mimeTypesMessage = "Veuillez télécharger le fichier sous le format .xlsx !" * ) * @var File|null */ private $file; /** * @ORM\Column(type="text", nullable="true") */ private $description; public function getId(): ?int { return $this->id; } /** * @param File|\Symfony\Component\HttpFoundation\File\UploadedFile $imageFile */ public function setFile(?File $file = null): void { $this->file = $file; if (null !== $file) { // It is required that at least one field changes if you are using doctrine // otherwise the event listeners won't be called and the file is lost $this->updatedAt = new \DateTimeImmutable(); } } public function getFile(): ?File { return $this->file; } public function setFileName(?string $fileName): void { $this->fileName = $fileName; } public function getFileName(): ?string { return $this->fileName; } public function getDescription(): ?string { return $this->description; } public function setDescription(string $description): self { $this->description = $description; return $this; } }