<?phpnamespace App\Entity;use App\Entity\Actualiters;use Doctrine\ORM\Mapping as ORM;use App\Repository\ImageRepository;use Symfony\Component\HttpFoundation\File\File;use Vich\UploaderBundle\Mapping\Annotation as Vich;use Symfony\Component\Validator\Constraints as Assert;/** * @Vich\Uploadable */#[ORM\Entity(repositoryClass: ImageRepository::class)]class Image{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column(type: 'integer')] private $id; #[ORM\Column(type: 'string', length: 255)] private $name; /** * @Vich\UploadableField(mapping="photos", fileNameProperty="name") */ private $tmpName; #[ORM\Column(type: 'datetime')] private $updatedAt; #[ORM\ManyToOne(targetEntity: Ebook::class, inversedBy: 'images')] private $ebook; #[ORM\ManyToOne(targetEntity: WebsiteNews::class, inversedBy: 'images')] private $websiteNews; #[ORM\ManyToOne(targetEntity: actualiters::class, inversedBy: 'images')] private $actualiters; 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 getTmpName(): ?File { return $this->tmpName; } public function setTmpName(?File $tmpName): self { $this->tmpName = $tmpName; $this->updatedAt = new \DateTime('now'); return $this; } public function getUpdatedAt(): ?\DateTimeInterface { return $this->updatedAt; } public function setUpdatedAt(\DateTimeInterface $updatedAt): self { $this->updatedAt = $updatedAt; return $this; } public function getEbook(): ?Ebook { return $this->ebook; } public function setEbook(?Ebook $ebook): self { $this->ebook = $ebook; return $this; } public function getWebsiteNews(): ?WebsiteNews { return $this->websiteNews; } public function setWebsiteNews(?WebsiteNews $websiteNews): self { $this->websiteNews = $websiteNews; return $this; } public function getActualiters(): ?Actualiters { return $this->actualiters; } public function setActualiters(?Actualiters $actualiters): self { $this->actualiters = $actualiters; return $this; }}