src/Entity/Documentation.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\DocumentationRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=DocumentationRepository::class)
  7.  */
  8. class Documentation
  9. {
  10.     /**
  11.      * @ORM\Id
  12.      * @ORM\GeneratedValue
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\Column(type="datetime", nullable=true)
  18.      */
  19.     private $endValidityDate;
  20.     /**
  21.      * @ORM\Column(type="string", length=255 ,nullable=true)
  22.      */
  23.     private $observationTxt;
  24.     /**
  25.      * @ORM\Column(type="integer")
  26.      */
  27.     private $entityUser;
  28.     /**
  29.      * @var \DateTime $createdAt
  30.      *
  31.      *
  32.      * @ORM\Column(type="datetime" )
  33.      */
  34.     protected $createdAt;
  35.     /**
  36.      * @ORM\ManyToOne(targetEntity="DocumentType", inversedBy="documentation")
  37.      * @ORM\JoinColumn(name="document_type_id", referencedColumnName="id", nullable=true )
  38.      */
  39.     protected $documentType;
  40.     /**
  41.      * @var boolean
  42.      *
  43.      * @ORM\Column(type="boolean", nullable=true)
  44.      */
  45.     private $approvedInd;
  46.     /**
  47.      * @ORM\ManyToOne(targetEntity="User", inversedBy="documentation")
  48.      * @ORM\JoinColumn(name="user_id", referencedColumnName="id")
  49.      */
  50.     protected $user;
  51.     /**
  52.      * @ORM\ManyToOne(targetEntity="Supplier", inversedBy="documentation")
  53.      * @ORM\JoinColumn(name="supplier_id", referencedColumnName="id" )
  54.      */
  55.     protected $supplier;
  56.     /**
  57.      * @ORM\ManyToOne(targetEntity="File", inversedBy="documentation")
  58.      * @ORM\JoinColumn(name="file_id", referencedColumnName="id" , nullable=true)
  59.      */
  60.     protected $file;
  61.     public function getId(): ?int
  62.     {
  63.         return $this->id;
  64.     }
  65.     public function getEndValidityDate(): ?\DateTimeInterface
  66.     {
  67.         return $this->endValidityDate;
  68.     }
  69.     public function setEndValidityDate(?\DateTimeInterface $endValidityDate): self
  70.     {
  71.         $this->endValidityDate $endValidityDate;
  72.         return $this;
  73.     }
  74.     public function getEntityUser(): ?int
  75.     {
  76.         return $this->entityUser;
  77.     }
  78.     public function setEntityUser(int $entityUser): self
  79.     {
  80.         $this->entityUser $entityUser;
  81.         return $this;
  82.     }
  83.     /**
  84.      * @param \DateTime $createdAt
  85.      *
  86.      * @ORM\PrePersist
  87.      */
  88.     public function setCreatedAt()
  89.     {
  90.         $this->createdAt = new \DateTime(date('Y-m-d H:i:s'));
  91.     }
  92.     /**
  93.      * @return \DateTime
  94.      */
  95.     public function getCreatedAt()
  96.     {
  97.         return $this->createdAt;
  98.     }
  99.     /**
  100.      * @param \DateTime $updatedAt
  101.      *
  102.      */
  103.     public function setUpdatedAt()
  104.     {
  105.         $this->updatedAt = new \DateTime(date('Y-m-d H:i:s'));
  106.     }
  107.     /**
  108.      * @return \DateTime
  109.      */
  110.     public function getUpdatedAt()
  111.     {
  112.         return $this->updatedAt;
  113.     }
  114.     /**
  115.      * @return mixed
  116.      */
  117.     public function getDocumentType()
  118.     {
  119.         return $this->documentType;
  120.     }
  121.     /**
  122.      * @param mixed $documentType
  123.      */
  124.     public function setDocumentType($documentType): void
  125.     {
  126.         $this->documentType $documentType;
  127.     }
  128.     /**
  129.      * @return mixed
  130.      */
  131.     public function getFile()
  132.     {
  133.         return $this->file;
  134.     }
  135.     /**
  136.      * @param mixed $file
  137.      */
  138.     public function setFile($file): void
  139.     {
  140.         $this->file $file;
  141.     }
  142.     /**
  143.      * @return bool|null
  144.      */
  145.     public function isApprovedInd(): ?bool
  146.     {
  147.         return $this->approvedInd;
  148.     }
  149.     /**
  150.      * @param bool|null $approvedInd
  151.      */
  152.     public function setApprovedInd(?bool $approvedInd): void
  153.     {
  154.         $this->approvedInd $approvedInd;
  155.     }
  156.     /**
  157.      * @return mixed
  158.      */
  159.     public function getUser()
  160.     {
  161.         return $this->user;
  162.     }
  163.     /**
  164.      * @param mixed $user
  165.      */
  166.     public function setUser($user): void
  167.     {
  168.         $this->user $user;
  169.     }
  170.     /**
  171.      * @return mixed
  172.      */
  173.     public function getSupplier()
  174.     {
  175.         return $this->supplier;
  176.     }
  177.     /**
  178.      * @param mixed $supplier
  179.      */
  180.     public function setSupplier($supplier): void
  181.     {
  182.         $this->supplier $supplier;
  183.     }
  184.     /**
  185.      * @return mixed
  186.      */
  187.     public function getObservationTxt()
  188.     {
  189.         return $this->observationTxt;
  190.     }
  191.     /**
  192.      * @param mixed $observationTxt
  193.      */
  194.     public function setObservationTxt($observationTxt): void
  195.     {
  196.         $this->observationTxt $observationTxt;
  197.     }
  198. }