<?phpnamespace App\Entity;use App\Repository\DocumentManualRepository;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\HttpFoundation\File\File;use Vich\UploaderBundle\Mapping\Annotation as Vich;#[Vich\Uploadable]#[ORM\Entity(repositoryClass: DocumentManualRepository::class)]#[ORM\Table(name: 'document_manual')]class DocumentManual{ #[ORM\Id] #[ORM\GeneratedValue(strategy: "AUTO")] #[ORM\Column(type: "integer")] private ?int $id = null; #[ORM\Column(type: "string", length: 255)] private ?string $name = null; #[ORM\Column(type: "text", nullable: true)] private ?string $description = null; #[ORM\Column(type: "string", length: 255, nullable: true)] private ?string $filename = null; #[Vich\UploadableField(mapping: "documents", fileNameProperty: "filename")] private ?File $file = null; #[ORM\Column(type: "datetime", nullable: true)] private ?\DateTime $updatedAt = null; #[ORM\Column(type: "boolean")] private bool $enabled = true; #[ORM\Column(type: "integer")] private int $sortOrder = 0; public function getId(): ?int { return $this->id; } public function getName(): ?string { return $this->name; } public function setName(string $name): self { $this->name = $name; return $this; } public function getDescription(): ?string { return $this->description; } public function setDescription(?string $description): self { $this->description = $description; return $this; } public function getFilename(): ?string { return $this->filename; } public function setFilename(?string $filename): self { $this->filename = $filename; return $this; } public function getFile(): ?File { return $this->file; } public function setFile(?File $file): self { $this->file = $file; if ($file) { $this->updatedAt = new \DateTime('now'); } return $this; } public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } public function setUpdatedAt(?\DateTime $updatedAt): self { $this->updatedAt = $updatedAt; return $this; } public function isEnabled(): bool { return $this->enabled; } public function setEnabled(bool $enabled): self { $this->enabled = $enabled; return $this; } public function getSortOrder(): int { return $this->sortOrder; } public function setSortOrder(int $sortOrder): self { $this->sortOrder = $sortOrder; return $this; } public function __toString(): string { return $this->name ?? ''; }}