<?phpnamespace App\Entity;use App\Repository\PodcastPrivateGlobalRepository;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\HttpFoundation\File\File;use Vich\UploaderBundle\Mapping\Annotation as Vich;/** * @Vich\Uploadable */#[ORM\Entity(repositoryClass: PodcastPrivateGlobalRepository::class)]class PodcastPrivateGlobal{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column(type: 'integer')] private $id; // NOTE: This is not a mapped field of entity metadata, just a simple property. /** * @Vich\UploadableField(mapping="podcast_middle_file", fileNameProperty="voiceOffIntroFilename") * @var File|null */ private ?File $voiceOffIntroFile = null; #[ORM\Column(nullable: true)] private ?string $voiceOffIntroFilename = null; // NOTE: This is not a mapped field of entity metadata, just a simple property. /** * @Vich\UploadableField(mapping="podcast_middle_file", fileNameProperty="introFilename") * @var File|null */ private ?File $introFile = null; #[ORM\Column(nullable: true)] private ?string $introFilename = null; // NOTE: This is not a mapped field of entity metadata, just a simple property. /** * @Vich\UploadableField(mapping="podcast_middle_file", fileNameProperty="outroCommuneFilename") * @var File|null */ private ?File $outroCommuneFile = null; #[ORM\Column(nullable: true)] private ?string $outroCommuneFilename = null; #[ORM\Column(type: 'datetime_immutable')] private $updateAt; public function getId(): ?int { return $this->id; } /** * 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 $imageFile */ public function setVoiceOffIntroFile(?File $voiceOffIntroFile = null): void { $this->voiceOffIntroFile = $voiceOffIntroFile; if (null !== $voiceOffIntroFile) { // 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->updateAt = new \DateTimeImmutable(); } } public function getVoiceOffIntroFile(): ?File { return $this->voiceOffIntroFile; } public function setVoiceOffIntroFileName(?string $voiceOffIntroFilename): void { $this->voiceOffIntroFilename = $voiceOffIntroFilename; } public function getVoiceOffIntroFileName(): ?string { return $this->voiceOffIntroFilename; } /** * 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 $imageFile */ public function setIntroFile(?File $introFile = null): void { $this->introFile = $introFile; if (null !== $introFile) { // 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->updateAt = new \DateTimeImmutable(); } } public function getIntroFile(): ?File { return $this->introFile; } public function setIntroFileName(?string $introFilename): void { $this->introFilename = $introFilename; } public function getIntroFileName(): ?string { return $this->introFilename; } /** * 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 $imageFile */ public function setOutroCommuneFile(?File $outroCommuneFile = null): void { $this->outroCommuneFile = $outroCommuneFile; if (null !== $outroCommuneFile) { // 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->updateAt = new \DateTimeImmutable(); } } public function getOutroCommuneFile(): ?File { return $this->outroCommuneFile; } public function setOutroCommuneFileName(?string $outroCommuneFilename): void { $this->outroCommuneFilename = $outroCommuneFilename; } public function getOutroCommuneFileName(): ?string { return $this->outroCommuneFilename; } public function getUpdateAt(): ?\DateTimeImmutable { return $this->updateAt; } public function setUpdateAt(\DateTimeImmutable $updateAt): self { $this->updateAt = $updateAt; return $this; }}