<?php
namespace App\Entity;
use App\Repository\SupplierDocumentRepository;
use Gedmo\Timestampable\Traits\TimestampableEntity;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\HttpFoundation\File\File;
use Symfony\Component\HttpFoundation\File\UploadedFile;
use Doctrine\ORM\Mapping as ORM;
use Vich\UploaderBundle\Mapping\Annotation as Vich;
#[Vich\Uploadable]
#[UniqueEntity(fields: 'supplier')]
#[ORM\Entity(repositoryClass: SupplierDocumentRepository::class)]
#[ORM\Table(name: '`supplier_document`')]
class SupplierDocument
{
use TimestampableEntity;
#[ORM\Id]
#[ORM\GeneratedValue(strategy:"AUTO")]
#[ORM\Column(type: "integer")]
protected ?int $id = null;
#[ORM\ManyToOne(targetEntity:"App\Entity\Supplier", inversedBy:"documents")]
#[ORM\JoinColumn(name: "supplier_id", referencedColumnName: "id", nullable: false)]
protected $supplier;
#[ORM\Column(type: "string", length: 255, nullable: true)]
protected $pep = null;
#[Vich\UploadableField(mapping: "supplier_documents", fileNameProperty: "pep")]
protected $pepFile;
#[ORM\Column(type: "datetime", nullable: true)]
protected $pepUpdatedAt;
#[ORM\Column(type: "datetime", nullable: true)]
protected $pepValidUntil;
#[ORM\ManyToOne(targetEntity:"App\Entity\User", inversedBy:"supplierdocument")]
protected $pepUpdatedBy;
#[ORM\Column(type: "string", length: 255, nullable: true)]
protected $maya = null;
#[Vich\UploadableField(mapping: "supplier_documents", fileNameProperty: "maya")]
protected $mayaFile;
#[ORM\Column(type: "datetime", nullable: true)]
protected $mayaUpdatedAt;
#[ORM\Column(type: "datetime", nullable: true)]
protected $mayaValidUntil;
#[ORM\ManyToOne(targetEntity:"App\Entity\User", inversedBy:"supplierdocument")]
protected $mayaUpdatedBy;
#[ORM\Column(type: "string", length: 255, nullable: true)]
protected $ley = null;
/**
* @var File
*/
#[Vich\UploadableField(mapping: "supplier_documents", fileNameProperty: "ley")]
protected $leyFile;
#[ORM\Column(type: "datetime", nullable: true)]
protected $leyUpdatedAt;
#[ORM\Column(type: "datetime", nullable: true)]
protected $leyValidUntil;
#[ORM\ManyToOne(targetEntity:"App\Entity\User", inversedBy:"supplierdocument")]
protected $leyUpdatedBy;
#[ORM\Column(type: "string", length: 255, nullable: true)]
protected $const = null;
/**
* @var File
*/
#[Vich\UploadableField(mapping: "supplier_documents", fileNameProperty: "const")]
protected $constFile;
#[ORM\Column(type: "datetime", nullable: true)]
protected $constUpdatedAt;
#[ORM\Column(type: "datetime", nullable: true)]
protected $constValidUntil;
#[ORM\ManyToOne(targetEntity:"App\Entity\User", inversedBy:"supplierdocument")]
protected $constUpdatedBy;
#[ORM\Column(type: "string", length: 255, nullable: true)]
protected $finanz = null;
/**
* @var File
*/
#[Vich\UploadableField(mapping: "supplier_documents", fileNameProperty: "finanz")]
protected $finanzFile;
#[ORM\Column(type: "datetime", nullable: true)]
protected $finanzUpdatedAt;
#[ORM\Column(type: "datetime", nullable: true)]
protected $finanzValidUntil;
#[ORM\ManyToOne(targetEntity:"App\Entity\User", inversedBy:"supplierdocument")]
protected $finanzUpdatedBy;
#[ORM\Column(type: "string", length: 255, nullable: true)]
protected $form29 = null;
/**
* @var File
*/
#[Vich\UploadableField(mapping: "supplier_documents", fileNameProperty: "form29")]
protected $form29File;
#[ORM\Column(type: "datetime", nullable: true)]
protected $form29updatedAt;
#[ORM\Column(type: "datetime", nullable: true)]
protected $form29validUntil;
#[ORM\ManyToOne(targetEntity:"App\Entity\User", inversedBy:"supplierdocument")]
protected $form29updatedBy;
#[ORM\Column(type: "string", length: 255, nullable: true)]
protected $form22 = null;
/**
* @var File
*/
#[Vich\UploadableField(mapping: "supplier_documents", fileNameProperty: "form22")]
protected $form22File;
#[ORM\Column(type: "datetime", nullable: true)]
protected $form22updatedAt;
#[ORM\Column(type: "datetime", nullable: true)]
protected $form22validUntil;
#[ORM\ManyToOne(targetEntity:"App\Entity\User", inversedBy:"supplierdocument")]
protected $form22updatedBy;
#[ORM\Column(type: "string", length: 255, nullable: true)]
protected $otros = null;
/**
* @var File
*/
#[Vich\UploadableField(mapping: "supplier_documents", fileNameProperty: "otros")]
protected $otrosFile;
#[ORM\Column(type: "datetime", nullable: true)]
protected $otrosUpdatedAt;
#[ORM\Column(type: "datetime", nullable: true)]
protected $otrosValidUntil;
#[ORM\ManyToOne(targetEntity:"App\Entity\User", inversedBy:"supplierdocument")]
protected $otrosUpdatedBy;
#[ORM\Column(type: "string", length: 255, nullable: true)]
protected $infoBasica = null;
/**
* @var File
*/
#[Vich\UploadableField(mapping: "supplier_documents", fileNameProperty: "infoBasica")]
protected $infoBasicaFile;
#[ORM\Column(type: "datetime", nullable: true)]
protected $infoBasicaUpdatedAt;
#[ORM\Column(type: "datetime", nullable: true)]
protected $infoBasicaValidUntil;
#[ORM\ManyToOne(targetEntity:"App\Entity\User", inversedBy:"supplierdocument")]
protected $infoBasicaUpdatedBy;
#[ORM\Column(type: "string", length: 255, nullable: true)]
protected $mallaDirectores = null;
/**
* @var File
*/
#[Vich\UploadableField(mapping: "supplier_documents", fileNameProperty: "mallaDirectores")]
protected $mallaDirectoresFile;
#[ORM\Column(type: "datetime", nullable: true)]
protected $mallaDirectoresUpdatedAt;
#[ORM\Column(type: "datetime", nullable: true)]
protected $mallaDirectoresValidUntil;
#[ORM\ManyToOne(targetEntity:"App\Entity\User", inversedBy:"supplierdocument")]
protected $mallaDirectoresUpdatedBy;
/**
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* @return Supplier
*/
public function getSupplier()
{
return $this->supplier;
}
/**
* @param mixed $supplier
*/
public function setSupplier(Supplier $supplier)
{
if ($this->supplier === $supplier) {
return;
}
$this->supplier = $supplier;
}
/**
* @return string
*/
public function getPep()
{
return $this->pep;
}
/**
* @param string $pep
*/
public function setPep(string $pep = null)
{
$this->pep = $pep;
}
/**
* @return File
*/
public function getPepFile()
{
return $this->pepFile;
}
/**
* @param File $pepFile
*/
public function setPepFile(File $pepFile)
{
$this->pepFile = $pepFile;
if ($this->pepFile instanceof UploadedFile) {
$this->pep = $pepFile->getClientOriginalExtension();
$this->pepUpdatedAt = new \DateTime('now');
}
}
/**
* Sets updatedAt.
*
* @param \DateTime $pepUpdatedAt
* @return $this
*/
public function setPepUpdatedAt(\DateTime $pepUpdatedAt)
{
$this->pepUpdatedAt = $pepUpdatedAt;
return $this;
}
/**
* Returns updatedAt.
*
* @return mixed
*/
public function getPepUpdatedAt()
{
return $this->pepUpdatedAt;
}
/**
* @return string
*/
public function getLey()
{
return $this->ley;
}
/**
* @param string $ley
*/
public function setLey(string $ley = null)
{
$this->ley = $ley;
}
/**
* @return File
*/
public function getLeyFile()
{
return $this->leyFile;
}
/**
* @param File $leyFile
*/
public function setLeyFile(File $leyFile)
{
$this->leyFile = $leyFile;
if ($this->leyFile instanceof UploadedFile) {
$this->ley = $leyFile->getClientOriginalExtension();
$this->leyUpdatedAt = new \DateTime('now');
}
}
/**
* Sets updatedAt.
*
* @param \DateTime $leyUpdatedAt
* @return $this
*/
public function setLeyUpdatedAt(\DateTime $leyUpdatedAt)
{
$this->leyUpdatedAt = $leyUpdatedAt;
return $this;
}
/**
* Returns updatedAt.
*
* @return mixed
*/
public function getLeyUpdatedAt()
{
return $this->leyUpdatedAt;
}
/**
* @return string
*/
public function getConst()
{
return $this->const;
}
/**
* @param string $const
*/
public function setConst(string $const = null)
{
$this->const = $const;
}
/**
* @return File
*/
public function getConstFile()
{
return $this->constFile;
}
/**
* @param File $constFile
*/
public function setConstFile(File $constFile)
{
$this->constFile = $constFile;
if ($this->constFile instanceof UploadedFile) {
$this->const = $constFile->getClientOriginalExtension();
$this->constUpdatedAt = new \DateTime('now');
}
}
/**
* Sets updatedAt.
*
* @param \DateTime $constUpdatedAt
* @return $this
*/
public function setConstUpdatedAt(\DateTime $constUpdatedAt)
{
$this->constUpdatedAt = $constUpdatedAt;
return $this;
}
/**
* Returns updatedAt.
*
* @return mixed
*/
public function getConstUpdatedAt()
{
return $this->constUpdatedAt;
}
/**
* @return string
*/
public function getFinanz()
{
return $this->finanz;
}
/**
* @param string $finanz
*/
public function setFinanz(string $finanz = null)
{
$this->finanz = $finanz;
}
/**
* @return File
*/
public function getFinanzFile()
{
return $this->finanzFile;
}
/**
* @param File $finanzFile
*/
public function setFinanzFile(File $finanzFile)
{
$this->finanzFile = $finanzFile;
if ($this->finanzFile instanceof UploadedFile) {
$this->finanz = $finanzFile->getClientOriginalExtension();
$this->finanzUpdatedAt = new \DateTime('now');
}
}
/**
* Sets updatedAt.
*
* @param \DateTime $finanzUpdatedAt
* @return $this
*/
public function setFinanzUpdatedAt(\DateTime $finanzUpdatedAt)
{
$this->finanzUpdatedAt = $finanzUpdatedAt;
return $this;
}
/**
* Returns updatedAt.
*
* @return mixed
*/
public function getFinanzUpdatedAt()
{
return $this->finanzUpdatedAt;
}
/**
* @return string
*/
public function getForm22()
{
return $this->form22;
}
/**
* @param string $form22
*/
public function setForm22(string $form22 = null)
{
$this->form22 = $form22;
}
/**
* @return File
*/
public function getForm22File()
{
return $this->form22File;
}
/**
* @param File $form22File
*/
public function setForm22File(File $form22File)
{
$this->form22File = $form22File;
if ($this->form22File instanceof UploadedFile) {
$this->form22 = $form22File->getClientOriginalExtension();
$this->form22updatedAt = new \DateTime('now');
}
}
/**
* Sets updatedAt.
*
* @param \DateTime $form22UpdatedAt
* @return $this
*/
public function setForm22UpdatedAt(\DateTime $form22UpdatedAt)
{
$this->form22updatedAt = $form22UpdatedAt;
return $this;
}
/**
* Returns updatedAt.
*
* @return mixed
*/
public function getForm22UpdatedAt()
{
return $this->form22updatedAt;
}
/**
* @return string
*/
public function getForm29()
{
return $this->form29;
}
/**
* @param string $form29
*/
public function setForm29(string $form29 = null)
{
$this->form29 = $form29;
}
/**
* @return File
*/
public function getForm29File()
{
return $this->form29File;
}
/**
* @param File $form29File
*/
public function setForm29File(File $form29File)
{
$this->form29File = $form29File;
if ($this->form29File instanceof UploadedFile) {
$this->form29 = $form29File->getClientOriginalExtension();
$this->form29updatedAt = new \DateTime('now');
}
}
/**
* Sets updatedAt.
*
* @param \DateTime $form29UpdatedAt
* @return $this
*/
public function setForm29UpdatedAt(\DateTime $form29UpdatedAt)
{
$this->form29updatedAt = $form29UpdatedAt;
return $this;
}
/**
* Returns updatedAt.
*
* @return mixed
*/
public function getForm29UpdatedAt()
{
return $this->form29updatedAt;
}
/**
* @return string
*/
public function getOtros()
{
return $this->otros;
}
/**
* @param string $otros
*/
public function setOtros(string $otros = null)
{
$this->otros = $otros;
}
/**
* @return File
*/
public function getOtrosFile()
{
return $this->otrosFile;
}
/**
* @param File $otrosFile
*/
public function setOtrosFile(File $otrosFile)
{
$this->otrosFile = $otrosFile;
if ($this->otrosFile instanceof UploadedFile) {
$this->otros = $otrosFile->getClientOriginalExtension();
$this->otrosUpdatedAt = new \DateTime('now');
}
}
/**
* Sets updatedAt.
*
* @param \DateTime $otrosUpdatedAt
* @return $this
*/
public function setOtrosUpdatedAt(\DateTime $otrosUpdatedAt)
{
$this->otrosUpdatedAt = $otrosUpdatedAt;
return $this;
}
/**
* Returns updatedAt.
*
* @return mixed
*/
public function getOtrosUpdatedAt()
{
return $this->otrosUpdatedAt;
}
/**
* @return User
*/
public function getPepUpdatedBy()
{
return $this->pepUpdatedBy;
}
/**
* @param User $pepUpdatedBy
*/
public function setPepUpdatedBy(User $pepUpdatedBy): void
{
$this->pepUpdatedBy = $pepUpdatedBy;
}
/**
* @return User
*/
public function getLeyUpdatedBy()
{
return $this->leyUpdatedBy;
}
/**
* @param User $leyUpdatedBy
*/
public function setLeyUpdatedBy(User $leyUpdatedBy): void
{
$this->leyUpdatedBy = $leyUpdatedBy;
}
/**
* @return User
*/
public function getConstUpdatedBy()
{
return $this->constUpdatedBy;
}
/**
* @param User $constUpdatedBy
*/
public function setConstUpdatedBy(User $constUpdatedBy): void
{
$this->constUpdatedBy = $constUpdatedBy;
}
/**
* @return User
*/
public function getFinanzUpdatedBy()
{
return $this->finanzUpdatedBy;
}
/**
* @param User $finanzUpdatedBy
*/
public function setFinanzUpdatedBy(User $finanzUpdatedBy): void
{
$this->finanzUpdatedBy = $finanzUpdatedBy;
}
/**
* @return User
*/
public function getForm29UpdatedBy()
{
return $this->form29updatedBy;
}
/**
* @param User $form29UpdatedBy
*/
public function setForm29UpdatedBy(User $form29UpdatedBy): void
{
$this->form29updatedBy = $form29UpdatedBy;
}
/**
* @return User
*/
public function getForm22UpdatedBy()
{
return $this->form22updatedBy;
}
/**
* @param User $form22UpdatedBy
*/
public function setForm22UpdatedBy(User $form22UpdatedBy): void
{
$this->form22updatedBy = $form22UpdatedBy;
}
/**
* @return User
*/
public function getOtrosUpdatedBy()
{
return $this->otrosUpdatedBy;
}
/**
* @param User $otrosUpdatedBy
*/
public function setOtrosUpdatedBy(User $otrosUpdatedBy): void
{
$this->otrosUpdatedBy = $otrosUpdatedBy;
}
/**
* @return \DateTime
*/
public function getLeyValidUntil()
{
return $this->leyValidUntil;
}
/**
* @param \DateTime $leyValidUntil
*/
public function setLeyValidUntil($leyValidUntil): void
{
$this->leyValidUntil = $leyValidUntil;
}
/**
* @return \DateTime
*/
public function getConstValidUntil()
{
return $this->constValidUntil;
}
/**
* @param \DateTime $constValidUntil
*/
public function setConstValidUntil($constValidUntil): void
{
$this->constValidUntil = $constValidUntil;
}
/**
* @return \DateTime
*/
public function getFinanzValidUntil()
{
return $this->finanzValidUntil;
}
/**
* @param \DateTime $finanzValidUntil
*/
public function setFinanzValidUntil($finanzValidUntil): void
{
$this->finanzValidUntil = $finanzValidUntil;
}
/**
* @return \DateTime
*/
public function getForm29ValidUntil()
{
return $this->form29validUntil;
}
/**
* @param \DateTime $form29ValidUntil
*/
public function setForm29ValidUntil($form29ValidUntil): void
{
$this->form29validUntil = $form29ValidUntil;
}
/**
* @return \DateTime
*/
public function getForm22ValidUntil()
{
return $this->form22validUntil;
}
/**
* @param \DateTime $form22ValidUntil
*/
public function setForm22ValidUntil($form22ValidUntil): void
{
$this->form22validUntil = $form22ValidUntil;
}
/**
* @return \DateTime
*/
public function getOtrosValidUntil()
{
return $this->otrosValidUntil;
}
/**
* @param \DateTime $otrosValidUntil
*/
public function setOtrosValidUntil($otrosValidUntil): void
{
$this->otrosValidUntil = $otrosValidUntil;
}
/**
* @return \DateTime
*/
public function getPepValidUntil()
{
return $this->pepValidUntil;
}
/**
* @param \DateTime $pepValidUntil
*/
public function setPepValidUntil($pepValidUntil): void
{
$this->pepValidUntil = $pepValidUntil;
}
/**
* @return null
*/
public function getMaya()
{
return $this->maya;
}
/**
* @param null $maya
*/
public function setMaya($maya): void
{
$this->maya = $maya;
}
/**
* @return mixed
*/
public function getMayaFile()
{
return $this->mayaFile;
}
/**
* @param mixed $mayaFile
*/
public function setMayaFile($mayaFile): void
{
$this->mayaFile = $mayaFile;
}
/**
* @return mixed
*/
public function getMayaUpdatedAt()
{
return $this->mayaUpdatedAt;
}
/**
* @param mixed $mayaUpdatedAt
*/
public function setMayaUpdatedAt($mayaUpdatedAt): void
{
$this->mayaUpdatedAt = $mayaUpdatedAt;
}
/**
* @return mixed
*/
public function getMayaValidUntil()
{
return $this->mayaValidUntil;
}
/**
* @param mixed $mayaValidUntil
*/
public function setMayaValidUntil($mayaValidUntil): void
{
$this->mayaValidUntil = $mayaValidUntil;
}
/**
* @return mixed
*/
public function getMayaUpdatedBy()
{
return $this->mayaUpdatedBy;
}
/**
* @param mixed $mayaUpdatedBy
*/
public function setMayaUpdatedBy($mayaUpdatedBy): void
{
$this->mayaUpdatedBy = $mayaUpdatedBy;
}
/**
* @return string
*/
public function getInfoBasica()
{
return $this->infoBasica;
}
/**
* @param string $infoBasica
*/
public function setInfoBasica(string $infoBasica = null)
{
$this->infoBasica = $infoBasica;
}
/**
* @return File
*/
public function getInfoBasicaFile()
{
return $this->infoBasicaFile;
}
/**
* @param File $infoBasicaFile
*/
public function setInfoBasicaFile(File $infoBasicaFile)
{
$this->infoBasicaFile = $infoBasicaFile;
if ($this->infoBasicaFile instanceof UploadedFile) {
$this->infoBasica = $infoBasicaFile->getClientOriginalExtension();
$this->infoBasicaUpdatedAt = new \DateTime('now');
}
}
/**
* @return \DateTime
*/
public function getInfoBasicaUpdatedAt()
{
return $this->infoBasicaUpdatedAt;
}
/**
* @param \DateTime $infoBasicaUpdatedAt
*/
public function setInfoBasicaUpdatedAt(\DateTime $infoBasicaUpdatedAt)
{
$this->infoBasicaUpdatedAt = $infoBasicaUpdatedAt;
return $this;
}
/**
* @return \DateTime
*/
public function getInfoBasicaValidUntil()
{
return $this->infoBasicaValidUntil;
}
/**
* @param \DateTime $infoBasicaValidUntil
*/
public function setInfoBasicaValidUntil($infoBasicaValidUntil): void
{
$this->infoBasicaValidUntil = $infoBasicaValidUntil;
}
/**
* @return User
*/
public function getInfoBasicaUpdatedBy()
{
return $this->infoBasicaUpdatedBy;
}
/**
* @param User $infoBasicaUpdatedBy
*/
public function setInfoBasicaUpdatedBy(User $infoBasicaUpdatedBy): void
{
$this->infoBasicaUpdatedBy = $infoBasicaUpdatedBy;
}
/**
* @return string
*/
public function getMallaDirectores()
{
return $this->mallaDirectores;
}
/**
* @param string $mallaDirectores
*/
public function setMallaDirectores(string $mallaDirectores = null)
{
$this->mallaDirectores = $mallaDirectores;
}
/**
* @return File
*/
public function getMallaDirectoresFile()
{
return $this->mallaDirectoresFile;
}
/**
* @param File $mallaDirectoresFile
*/
public function setMallaDirectoresFile(File $mallaDirectoresFile)
{
$this->mallaDirectoresFile = $mallaDirectoresFile;
if ($this->mallaDirectoresFile instanceof UploadedFile) {
$this->mallaDirectores = $mallaDirectoresFile->getClientOriginalExtension();
$this->mallaDirectoresUpdatedAt = new \DateTime('now');
}
}
/**
* @return \DateTime
*/
public function getMallaDirectoresUpdatedAt()
{
return $this->mallaDirectoresUpdatedAt;
}
/**
* @param \DateTime $mallaDirectoresUpdatedAt
*/
public function setMallaDirectoresUpdatedAt(\DateTime $mallaDirectoresUpdatedAt)
{
$this->mallaDirectoresUpdatedAt = $mallaDirectoresUpdatedAt;
return $this;
}
/**
* @return \DateTime
*/
public function getMallaDirectoresValidUntil()
{
return $this->mallaDirectoresValidUntil;
}
/**
* @param \DateTime $mallaDirectoresValidUntil
*/
public function setMallaDirectoresValidUntil($mallaDirectoresValidUntil): void
{
$this->mallaDirectoresValidUntil = $mallaDirectoresValidUntil;
}
/**
* @return User
*/
public function getMallaDirectoresUpdatedBy()
{
return $this->mallaDirectoresUpdatedBy;
}
/**
* @param User $mallaDirectoresUpdatedBy
*/
public function setMallaDirectoresUpdatedBy(User $mallaDirectoresUpdatedBy): void
{
$this->mallaDirectoresUpdatedBy = $mallaDirectoresUpdatedBy;
}
}