<?php
namespace App\Entity;
use App\Repository\DocsLandlordsRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\HttpFoundation\File\File;
use Vich\UploaderBundle\Mapping\Annotation as Vich;
#[ORM\Entity(repositoryClass: DocsLandlordsRepository::class)]
#[Vich\Uploadable]
class DocsLandlords
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $docName = null;
#[Vich\UploadableField(mapping: 'landlord_docs', fileNameProperty: 'docName')]
private ?File $docFile = null;
#[ORM\ManyToOne(inversedBy: 'docsLandlords',cascade: ['persist'])]
private ?Landlords $landlord = null;
#[ORM\Column(nullable: true)]
private ?\DateTimeImmutable $createdAt = null;
#[ORM\ManyToOne(inversedBy: 'docsLandlords')]
private ?User $uploadedBy = null;
public function getId(): ?int
{
return $this->id;
}
public function getDocName(): ?string
{
return $this->docName;
}
public function setDocName(?string $docName): self
{
$this->docName = $docName;
return $this;
}
public function getDocFile(): ?File
{
return $this->docFile;
}
public function setDocFile(?File $docFile): void
{
$this->docFile = $docFile;
//return $this;
}
public function getLandlord(): ?Landlords
{
return $this->landlord;
}
public function setLandlord(?Landlords $landlord): self
{
$this->landlord = $landlord;
return $this;
}
public function getCreatedAt(): ?\DateTimeImmutable
{
return $this->createdAt;
}
public function setCreatedAt(?\DateTimeImmutable $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getUploadedBy(): ?User
{
return $this->uploadedBy;
}
public function setUploadedBy(?User $uploadedBy): self
{
$this->uploadedBy = $uploadedBy;
return $this;
}
}