src/Entity/Prescriber.php line 18

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\PrescriberRepository;
  4. use DateTimeImmutable;
  5. use DateTimeInterface;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Component\HttpFoundation\File\File;
  8. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  9. #[ORM\Entity(repositoryClassPrescriberRepository::class)]
  10. /**
  11.  * @Vich\Uploadable()
  12.  */
  13. class Prescriber
  14. {
  15.     #[ORM\Id]
  16.     #[ORM\GeneratedValue]
  17.     #[ORM\Column(type'integer')]
  18.     private $id;
  19.     #[ORM\Column(type'string'length255)]
  20.     private $name;
  21.     #[ORM\Column(type'string'length255)]
  22.     private $mail;
  23.     #[ORM\Column(type'string'nullabletrue)]
  24.     private $logoName;
  25.     #[ORM\Column(type'integer'nullabletrue)]
  26.     private $logoSize;
  27.     #[ORM\Column(type'datetime'nullabletrue)]
  28.     private $logoUpdatedAt;
  29.     #[Vich\UploadableField(mapping'prescriber_logo'fileNameProperty'logoName'size'logoSize')]
  30.     /**
  31.      * @Vich\UploadableField(mapping="prescriber_logo", fileNameProperty="logoName", size="logoSize")
  32.      */
  33.     private $logoFile;
  34.     #[ORM\Column(type'string'nullabletrue)]
  35.     private $logoAlt;
  36.     #[ORM\ManyToOne(targetEntityAccountingFirm::class, inversedBy'prescribers')]
  37.     private $accountingFirm;
  38.     public function getId(): ?int
  39.     {
  40.         return $this->id;
  41.     }
  42.     public function getName(): ?string
  43.     {
  44.         return $this->name;
  45.     }
  46.     public function setName(string $name): self
  47.     {
  48.         $this->name $name;
  49.         return $this;
  50.     }
  51.     public function getMail(): ?string
  52.     {
  53.         return $this->mail;
  54.     }
  55.     public function setMail(string $mail): self
  56.     {
  57.         $this->mail $mail;
  58.         return $this;
  59.     }
  60.     public function getLogoName(): ?string
  61.     {
  62.         return $this->logoName;
  63.     }
  64.     public function setLogoName(?string $logoName): self
  65.     {
  66.         $this->logoName $logoName;
  67.         return $this;
  68.     }
  69.     public function getLogoSize(): ?int
  70.     {
  71.         return $this->logoSize;
  72.     }
  73.     public function setLogoSize(?int $logoSize): self
  74.     {
  75.         $this->logoSize $logoSize;
  76.         return $this;
  77.     }
  78.     public function getLogoUpdatedAt(): ?DateTimeInterface
  79.     {
  80.         return $this->logoUpdatedAt;
  81.     }
  82.     public function setLogoUpdatedAt(?DateTimeInterface $logoUpdatedAt): self
  83.     {
  84.         $this->logoUpdatedAt $logoUpdatedAt;
  85.         return $this;
  86.     }
  87.     public function getLogoFile(): ?File
  88.     {
  89.         return $this->logoFile;
  90.     }
  91.     public function setLogoFile(?File $logoFile): self
  92.     {
  93.         $this->logoFile $logoFile;
  94.         if (null !== $this->logoFile) {
  95.             $this->logoUpdatedAt = new DateTimeImmutable();
  96.         }
  97.         return $this;
  98.     }
  99.     public function getLogoAlt(): ?string
  100.     {
  101.         return $this->logoAlt;
  102.     }
  103.     public function setLogoAlt(?string $logoAlt): self
  104.     {
  105.         $this->logoAlt $logoAlt;
  106.         return $this;
  107.     }
  108.     public function getAccountingFirm(): ?AccountingFirm
  109.     {
  110.         return $this->accountingFirm;
  111.     }
  112.     public function setAccountingFirm(?AccountingFirm $accountingFirm): self
  113.     {
  114.         $this->accountingFirm $accountingFirm;
  115.         return $this;
  116.     }
  117. }