src/Entity/Files.php line 14
<?phpnamespace App\Entity;use App\Repository\FilesRepository;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\HttpFoundation\File\File;use Vich\UploaderBundle\Mapping\Annotation as Vich;#[ORM\Entity(repositoryClass: FilesRepository::class)]#[Vich\Uploadable]class Files{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]private ?\DateTimeInterface $CreationAt = null;#[ORM\ManyToOne(inversedBy: 'files')]private ?User $CreatedBy = null;#[ORM\Column(length: 255, nullable: true)]private ?string $route = null;#[ORM\Column(length: 10, nullable: true)]private ?string $Parametre = null;// NOTE: This is not a mapped field of entity metadata, just a simple property.#[Vich\UploadableField(mapping: 'file_attachement', fileNameProperty: 'fileName', size: 'fileSize')]private ?File $AttachementFile = null;#[ORM\Column(nullable: true)]private ?string $fileName = null;#[ORM\Column(nullable: true)]private ?int $fileSize = null;#[ORM\Column(length: 255, nullable: true)]private ?string $Description = null;#[ORM\ManyToOne]private ?LawOffice $LawOffice = null;public function getId(): ?int{return $this->id;}public function getCreationAt(): ?\DateTimeInterface{return $this->CreationAt;}public function setCreationAt(?\DateTimeInterface $CreationAt): self{$this->CreationAt = $CreationAt;return $this;}public function getCreatedBy(): ?User{return $this->CreatedBy;}public function setCreatedBy(?User $CreatedBy): self{$this->CreatedBy = $CreatedBy;return $this;}public function getRoute(): ?string{return $this->route;}public function setRoute(?string $route): self{$this->route = $route;return $this;}public function getParametre(): ?string{return $this->Parametre;}public function setParametre(?string $Parametre): self{$this->Parametre = $Parametre;return $this;}/*** If manually uploading a file (i.e. not using Symfony Form) ensure an instance* of 'UploadedFile' is injected into this setter to trigger the update. If this* bundle's configuration parameter 'inject_on_load' is set to 'true' this setter* must be able to accept an instance of 'File' as the bundle will inject one here* during Doctrine hydration.** @param File|\Symfony\Component\HttpFoundation\File\UploadedFile|null $AttachementFile*/public function setAttachementFile(?File $AttachementFile = null): void{$this->AttachementFile = $AttachementFile;if (null !== $AttachementFile) {// 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 getAttachementFile(): ?File{return $this->AttachementFile;}public function setFileName(?string $fileName): void{$this->fileName = $fileName;}public function getFileName(): ?string{return $this->fileName;}public function setFileSize(?int $fileSize): void{$this->fileSize = $fileSize;}public function getFileSize(): ?int{return $this->fileSize;}public function getDescription(): ?string{return $this->Description;}public function setDescription(?string $Description): self{$this->Description = $Description;return $this;}public function getLawOffice(): ?LawOffice{return $this->LawOffice;}public function setLawOffice(?LawOffice $LawOffice): self{$this->LawOffice = $LawOffice;return $this;}}