<?phpnamespace App\Entity;use App\Repository\PartnerRepository;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\HttpFoundation\File\File;use Vich\UploaderBundle\Mapping\Annotation as Vich;/** * @Vich\Uploadable */#[ORM\Entity(repositoryClass: PartnerRepository::class)]class Partner{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column(type: 'integer')] private $id; #[ORM\ManyToOne(targetEntity: AccountingFirm::class, inversedBy: 'partner')] #[ORM\JoinColumn(nullable: false)] private $accountingFirm; #[ORM\Column(type: 'string', length: 255)] private $link; #[ORM\Column(type: 'string', length: 255, nullable: true)] private $logo; /** * @Vich\UploadableField(mapping="partners", fileNameProperty="logo") * @var File|null */ private $tmpLogo = null; #[ORM\Column(type: 'datetime', nullable: true)] private $updated_at; public function getId(): ?int { return $this->id; } public function getAccountingFirm(): ?AccountingFirm { return $this->accountingFirm; } public function setAccountingFirm(?AccountingFirm $accountingFirm): self { $this->accountingFirm = $accountingFirm; return $this; } public function getLink(): ?string { return $this->link; } public function setLink(string $link): self { $this->link = $link; return $this; } public function getLogo(): ?string { return $this->logo; } public function setLogo(?string $logo): self { $this->logo = $logo; return $this; }public function setTmpLogo(?File $tmpLogo = null): void { $this->tmpLogo = $tmpLogo; $this->updated_at = new \DateTime('now'); } public function getTmpLogo() : ?File { return $this->tmpLogo; } public function getUpdatedAt(): ?\DateTimeInterface { return $this->updated_at; } public function setUpdatedAt(?\DateTimeInterface $updated_at): self { $this->updated_at = $updated_at; return $this; }}