<?php
namespace App\Entity;
use App\Repository\DocsTenantsRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use App\Entity\PropertyList;
use Symfony\Component\HttpFoundation\File\File;
use Vich\UploaderBundle\Mapping\Annotation as Vich;
#[ORM\Entity(repositoryClass: DocsTenantsRepository::class)]
#[Vich\Uploadable]
class DocsTenants
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $docName = null;
#[Vich\UploadableField(mapping: 'tenant_docs', fileNameProperty:'docName')]
private ?File $docType = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $docCategory = null;
#[ORM\ManyToOne(inversedBy: 'docsTenants')]
private ?Tenants $tenant = null;
#[ORM\Column(nullable: true)]
private ?\DateTimeImmutable $createdAt = null;
#[ORM\ManyToOne(inversedBy: 'tenantDocument')]
private ?Broker $uploadedBy = null;
#[ORM\ManyToOne(inversedBy: 'tenantDocument')]
private ?User $uploadedByUser = null;
#[Vich\UploadableField(mapping: 'tenant_docs', fileNameProperty: 'idName')]
private ?File $idDoc = null;
#[Vich\UploadableField(mapping: 'tenant_docs', fileNameProperty: 'payslipName')]
private ?File $payslip = null;
#[Vich\UploadableField(mapping: 'tenant_docs', fileNameProperty: 'sepaName')]
private ?File $sepa = null;
#[Vich\UploadableField(mapping: 'tenant_docs', fileNameProperty: 'titularidadName')]
private ?File $titularidad = null;
#[Vich\UploadableField(mapping: 'tenant_docs', fileNameProperty: 'rentaName')]
private ?File $renta = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $idName = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $payslipName = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $sepaName = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $titularidadName = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $rentaName = 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 getDocType(): ?File
{
return $this->docType;
}
public function setDocType(?File $docType= null): void
{
$this->docType = $docType;
if (null !== $docType) {
$this->createdAt = new \DateTimeImmutable();
}
//return $this;
}
public function getDocCategory(): ?string
{
return $this->docCategory;
}
public function setDocCategory(?string $docCategory): self
{
$this->docCategory = $docCategory;
return $this;
}
public function getTenant(): ?Tenants
{
return $this->tenant;
}
public function setTenant(?Tenants $tenant): self
{
$this->tenant = $tenant;
return $this;
}
public function getCreatedAt(): ?\DateTimeImmutable
{
return $this->createdAt;
}
public function setCreatedAt(?\DateTimeImmutable $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getIdDoc(): ?File
{
return $this->idDoc;
}
public function setIdDoc(?File $idDoc =null): void
{
$this->idDoc = $idDoc;
//return $this;
}
public function getPayslip(): ?File
{
return $this->payslip;
}
public function setPayslip(?File $payslip=null): void
{
$this->payslip = $payslip;
//return $this;
}
public function getSepa(): ?File
{
return $this->sepa;
}
public function setSepa(?File $sepa=null): void
{
$this->sepa = $sepa;
//return $this;
}
public function getTitularidad(): ?File
{
return $this->titularidad;
}
public function setTitularidad(?File $titularidad=null): void
{
$this->titularidad = $titularidad;
//return $this;
}
public function getRenta(): ?File
{
return $this->renta;
}
public function setRenta(?File $renta=null): void
{
$this->renta = $renta;
//return $this;
}
public function getUploadedBy(): ?Broker
{
return $this->uploadedBy;
}
public function setUploadedBy(?Broker $uploadedBy): self
{
$this->uploadedBy = $uploadedBy;
return $this;
}
public function getUploadedByUser(): ?User
{
return $this->uploadedByUser;
}
public function setUploadedByUser(?User $uploadedByUser): self
{
$this->uploadedByUser = $uploadedByUser;
return $this;
}
public function getIdName(): ?string
{
return $this->idName;
}
public function setIdName(?string $idName): self
{
$this->idName = $idName;
return $this;
}
public function getPayslipName(): ?string
{
return $this->payslipName;
}
public function setPayslipName(?string $payslipName): self
{
$this->payslipName = $payslipName;
return $this;
}
public function getSepaName(): ?string
{
return $this->sepaName;
}
public function setSepaName(?string $sepaName): self
{
$this->sepaName = $sepaName;
return $this;
}
public function getTitularidadName(): ?string
{
return $this->titularidadName;
}
public function setTitularidadName(?string $titularidadName): self
{
$this->titularidadName = $titularidadName;
return $this;
}
public function getRentaName(): ?string
{
return $this->rentaName;
}
public function setRentaName(?string $rentaName): self
{
$this->rentaName = $rentaName;
return $this;
}
}