src/Entity/DocsLandlords.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\DocsLandlordsRepository;
  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(repositoryClassDocsLandlordsRepository::class)]
  8. #[Vich\Uploadable]
  9. class DocsLandlords
  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'landlord_docs'fileNameProperty'docName')]
  18.     private ?File $docFile null;
  19.     #[ORM\ManyToOne(inversedBy'docsLandlords',cascade: ['persist'])]
  20.     private ?Landlords $landlord null;
  21.     #[ORM\Column(nullabletrue)]
  22.     private ?\DateTimeImmutable $createdAt null;
  23.     #[ORM\ManyToOne(inversedBy'docsLandlords')]
  24.     private ?User $uploadedBy null;
  25.     public function getId(): ?int
  26.     {
  27.         return $this->id;
  28.     }
  29.     public function getDocName(): ?string
  30.     {
  31.         return $this->docName;
  32.     }
  33.     public function setDocName(?string $docName): self
  34.     {
  35.         $this->docName $docName;
  36.         return $this;
  37.     }
  38.     public function getDocFile(): ?File
  39.     {
  40.         return $this->docFile;
  41.     }
  42.     public function setDocFile(?File $docFile): void
  43.     {
  44.         $this->docFile $docFile;
  45.         //return $this;
  46.     }
  47.     public function getLandlord(): ?Landlords
  48.     {
  49.         return $this->landlord;
  50.     }
  51.     public function setLandlord(?Landlords $landlord): self
  52.     {
  53.         $this->landlord $landlord;
  54.         return $this;
  55.     }
  56.     public function getCreatedAt(): ?\DateTimeImmutable
  57.     {
  58.         return $this->createdAt;
  59.     }
  60.     public function setCreatedAt(?\DateTimeImmutable $createdAt): self
  61.     {
  62.         $this->createdAt $createdAt;
  63.         return $this;
  64.     }
  65.     public function getUploadedBy(): ?User
  66.     {
  67.         return $this->uploadedBy;
  68.     }
  69.     public function setUploadedBy(?User $uploadedBy): self
  70.     {
  71.         $this->uploadedBy $uploadedBy;
  72.         return $this;
  73.     }
  74. }