src/Entity/DocsPotentials.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\DocsPotentialsRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\HttpFoundation\File\File;
  6. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  7. #[ORM\Entity(repositoryClassDocsPotentialsRepository::class)]
  8. #[Vich\Uploadable]
  9. class DocsPotentials
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(length255nullabletrue)]
  16.     private ?string $docName null;
  17.     #[Vich\UploadableField(mapping'potential_docs'fileNameProperty'docName')]
  18.     private ?File $docFile null;
  19.     #[ORM\Column(length255nullabletrue)]
  20.     private ?string $docCategory null;
  21.     #[ORM\Column(nullabletrue)]
  22.     private ?\DateTimeImmutable $createdAt null;
  23.     #[ORM\ManyToOne(inversedBy'docsPotentials')]
  24.     private ?User $uploadedBy null;
  25.     
  26.     #[ORM\ManyToOne(inversedBy'docsPotentials')]
  27.     private ?PotentialClients $potential null;
  28.     
  29.     public function getId(): ?int
  30.     {
  31.         return $this->id;
  32.     }
  33.     public function getDocName(): ?string
  34.     {
  35.         return $this->docName;
  36.     }
  37.     public function setDocName(?string $docName): self
  38.     {
  39.         $this->docName $docName;
  40.         return $this;
  41.     }
  42.     public function getPotential(): ?PotentialClients
  43.     {
  44.         return $this->potential;
  45.     }
  46.     public function setPotential(?PotentialClients $potential): self
  47.     {
  48.         $this->potential $potential;
  49.         return $this;
  50.     }
  51.     public function getDocCategory(): ?string
  52.     {
  53.         return $this->docCategory;
  54.     }
  55.     public function setDocCategory(?string $docCategory): self
  56.     {
  57.         $this->docCategory $docCategory;
  58.         return $this;
  59.     }
  60.     public function getCreatedAt(): ?\DateTimeImmutable
  61.     {
  62.         return $this->createdAt;
  63.     }
  64.     public function setCreatedAt(?\DateTimeImmutable $createdAt): self
  65.     {
  66.         $this->createdAt $createdAt;
  67.         return $this;
  68.     }
  69.     public function getUploadedBy(): ?User
  70.     {
  71.         return $this->uploadedBy;
  72.     }
  73.     public function setUploadedBy(?User $uploadedBy): self
  74.     {
  75.         $this->uploadedBy $uploadedBy;
  76.         return $this;
  77.     }
  78.     public function getDocFile(): ?File
  79.     {
  80.         return $this->docFile;
  81.     }
  82.     public function setDocFile(?File $docFile): void
  83.     {
  84.         $this->docFile $docFile;
  85.         if (null !== $docFile) {
  86.             $this->createdAt = new \DateTimeImmutable();
  87.         }
  88.     }
  89. }