<?phpnamespace App\Entity;use App\Repository\PageServiceRepository;use Doctrine\ORM\Mapping as ORM;use Vich\UploaderBundle\Mapping\Annotation as Vich;use Symfony\Component\HttpFoundation\File\File;/** @Vich\Uploadable */#[ORM\Entity(repositoryClass: PageServiceRepository::class)]class PageService{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column(type: 'integer')] private $id; #[ORM\Column(type: 'text', nullable: true)] private $titre; #[ORM\Column(type: 'text', nullable: true)] private $description; #[ORM\Column(type: 'string', length: 255, nullable: true)] private $logo; #[ORM\ManyToOne(targetEntity: SeoPage::class, inversedBy: 'pageServices')] #[ORM\JoinColumn(nullable: false)] private $seopage; /** * @Vich\UploadableField(mapping="services_logos", fileNameProperty="logo") * @var File|null */ private $tmpLogo = null; #[ORM\Column(type: 'datetime', nullable: true)] private $updatedAt; public function getId(): ?int { return $this->id; } public function getTitre(): ?string { return $this->titre; } public function setTitre(?string $titre): self { $this->titre = $titre; return $this; } public function getDescription(): ?string { return $this->description; } public function setDescription(string $description): self { $this->description = $description; return $this; } public function getLogo(): ?string { return $this->logo; } public function setLogo(?string $logo): self { $this->logo = $logo; return $this; } public function getSeopage(): ?SeoPage { return $this->seopage; } public function setSeopage(?SeoPage $seopage): self { $this->seopage = $seopage; return $this; } public function setTmpLogo(?File $tmpLogo = null): void { $this->tmpLogo = $tmpLogo; if($tmpLogo) $this->updatedAt = new \DateTime('now'); } public function getTmpLogo() : ?File { return $this->tmpLogo; } public function getUpdatedAt(): ?\DateTimeInterface { return $this->updatedAt; } public function setUpdatedAt(?\DateTimeInterface $updatedAt): self { $this->updatedAt = $updatedAt; return $this; }}