<?php
namespace App\Entity;
use App\Repository\DocumentationRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=DocumentationRepository::class)
*/
class Documentation
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $endValidityDate;
/**
* @ORM\Column(type="string", length=255 ,nullable=true)
*/
private $observationTxt;
/**
* @ORM\Column(type="integer")
*/
private $entityUser;
/**
* @var \DateTime $createdAt
*
*
* @ORM\Column(type="datetime" )
*/
protected $createdAt;
/**
* @ORM\ManyToOne(targetEntity="DocumentType", inversedBy="documentation")
* @ORM\JoinColumn(name="document_type_id", referencedColumnName="id", nullable=true )
*/
protected $documentType;
/**
* @var boolean
*
* @ORM\Column(type="boolean", nullable=true)
*/
private $approvedInd;
/**
* @ORM\ManyToOne(targetEntity="User", inversedBy="documentation")
* @ORM\JoinColumn(name="user_id", referencedColumnName="id")
*/
protected $user;
/**
* @ORM\ManyToOne(targetEntity="Supplier", inversedBy="documentation")
* @ORM\JoinColumn(name="supplier_id", referencedColumnName="id" )
*/
protected $supplier;
/**
* @ORM\ManyToOne(targetEntity="File", inversedBy="documentation")
* @ORM\JoinColumn(name="file_id", referencedColumnName="id" , nullable=true)
*/
protected $file;
public function getId(): ?int
{
return $this->id;
}
public function getEndValidityDate(): ?\DateTimeInterface
{
return $this->endValidityDate;
}
public function setEndValidityDate(?\DateTimeInterface $endValidityDate): self
{
$this->endValidityDate = $endValidityDate;
return $this;
}
public function getEntityUser(): ?int
{
return $this->entityUser;
}
public function setEntityUser(int $entityUser): self
{
$this->entityUser = $entityUser;
return $this;
}
/**
* @param \DateTime $createdAt
*
* @ORM\PrePersist
*/
public function setCreatedAt()
{
$this->createdAt = new \DateTime(date('Y-m-d H:i:s'));
}
/**
* @return \DateTime
*/
public function getCreatedAt()
{
return $this->createdAt;
}
/**
* @param \DateTime $updatedAt
*
*/
public function setUpdatedAt()
{
$this->updatedAt = new \DateTime(date('Y-m-d H:i:s'));
}
/**
* @return \DateTime
*/
public function getUpdatedAt()
{
return $this->updatedAt;
}
/**
* @return mixed
*/
public function getDocumentType()
{
return $this->documentType;
}
/**
* @param mixed $documentType
*/
public function setDocumentType($documentType): void
{
$this->documentType = $documentType;
}
/**
* @return mixed
*/
public function getFile()
{
return $this->file;
}
/**
* @param mixed $file
*/
public function setFile($file): void
{
$this->file = $file;
}
/**
* @return bool|null
*/
public function isApprovedInd(): ?bool
{
return $this->approvedInd;
}
/**
* @param bool|null $approvedInd
*/
public function setApprovedInd(?bool $approvedInd): void
{
$this->approvedInd = $approvedInd;
}
/**
* @return mixed
*/
public function getUser()
{
return $this->user;
}
/**
* @param mixed $user
*/
public function setUser($user): void
{
$this->user = $user;
}
/**
* @return mixed
*/
public function getSupplier()
{
return $this->supplier;
}
/**
* @param mixed $supplier
*/
public function setSupplier($supplier): void
{
$this->supplier = $supplier;
}
/**
* @return mixed
*/
public function getObservationTxt()
{
return $this->observationTxt;
}
/**
* @param mixed $observationTxt
*/
public function setObservationTxt($observationTxt): void
{
$this->observationTxt = $observationTxt;
}
}