<?php
namespace App\Entity;
use App\Repository\PrescriberRepository;
use DateTimeImmutable;
use DateTimeInterface;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\HttpFoundation\File\File;
use Vich\UploaderBundle\Mapping\Annotation as Vich;
#[ORM\Entity(repositoryClass: PrescriberRepository::class)]
/**
* @Vich\Uploadable()
*/
class Prescriber
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(type: 'string', length: 255)]
private $name;
#[ORM\Column(type: 'string', length: 255)]
private $mail;
#[ORM\Column(type: 'string', nullable: true)]
private $logoName;
#[ORM\Column(type: 'integer', nullable: true)]
private $logoSize;
#[ORM\Column(type: 'datetime', nullable: true)]
private $logoUpdatedAt;
#[Vich\UploadableField(mapping: 'prescriber_logo', fileNameProperty: 'logoName', size: 'logoSize')]
/**
* @Vich\UploadableField(mapping="prescriber_logo", fileNameProperty="logoName", size="logoSize")
*/
private $logoFile;
#[ORM\Column(type: 'string', nullable: true)]
private $logoAlt;
#[ORM\ManyToOne(targetEntity: AccountingFirm::class, inversedBy: 'prescribers')]
private $accountingFirm;
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 getMail(): ?string
{
return $this->mail;
}
public function setMail(string $mail): self
{
$this->mail = $mail;
return $this;
}
public function getLogoName(): ?string
{
return $this->logoName;
}
public function setLogoName(?string $logoName): self
{
$this->logoName = $logoName;
return $this;
}
public function getLogoSize(): ?int
{
return $this->logoSize;
}
public function setLogoSize(?int $logoSize): self
{
$this->logoSize = $logoSize;
return $this;
}
public function getLogoUpdatedAt(): ?DateTimeInterface
{
return $this->logoUpdatedAt;
}
public function setLogoUpdatedAt(?DateTimeInterface $logoUpdatedAt): self
{
$this->logoUpdatedAt = $logoUpdatedAt;
return $this;
}
public function getLogoFile(): ?File
{
return $this->logoFile;
}
public function setLogoFile(?File $logoFile): self
{
$this->logoFile = $logoFile;
if (null !== $this->logoFile) {
$this->logoUpdatedAt = new DateTimeImmutable();
}
return $this;
}
public function getLogoAlt(): ?string
{
return $this->logoAlt;
}
public function setLogoAlt(?string $logoAlt): self
{
$this->logoAlt = $logoAlt;
return $this;
}
public function getAccountingFirm(): ?AccountingFirm
{
return $this->accountingFirm;
}
public function setAccountingFirm(?AccountingFirm $accountingFirm): self
{
$this->accountingFirm = $accountingFirm;
return $this;
}
}