src/Entity/DocumentType.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\DocumentTypeRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=DocumentTypeRepository::class)
  9.  */
  10. class DocumentType
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=255)
  20.      */
  21.     private $name;
  22.     /**
  23.      * @ORM\Column(type="text")
  24.      */
  25.     private $description;
  26.     /**
  27.      * @var boolean
  28.      *
  29.      * @ORM\Column( type="boolean")
  30.      */
  31.     private $requiredInd;
  32.     /**
  33.      * @var boolean
  34.      *
  35.      * @ORM\Column( type="boolean" , options={"default":"1"})
  36.      */
  37.     private $active 1;
  38.     /**
  39.      * @ORM\Column(type="integer")
  40.      */
  41.     private $entityUser;
  42.     /**
  43.      * @var \DateTime $createdAt
  44.      *
  45.      *
  46.      * @ORM\Column(type="datetime", nullable=true )
  47.      */
  48.     protected $createdAt;
  49.     /**
  50.      * @var \DateTime $updatedAt
  51.      *
  52.      *
  53.      * @ORM\Column(type="datetime", nullable=true )
  54.      */
  55.     protected $updatedAt;
  56.     /**
  57.      * @ORM\OneToMany(targetEntity="Documentation", mappedBy="documentType")
  58.      */
  59.     protected $documentation;
  60.     /**
  61.      * @ORM\OneToMany(targetEntity="ClassDocumentType", mappedBy="documentType")
  62.      */
  63.     protected $classDocumentType;
  64.     /**
  65.      * @ORM\ManyToOne(targetEntity="User", inversedBy="documentType")
  66.      * @ORM\JoinColumn(name="quality_user_id", referencedColumnName="id", nullable=true)
  67.      */
  68.     protected $qualityUser;
  69.     public function __construct()
  70.     {
  71.         $this->documentation = new ArrayCollection();
  72.         $this->classDocumentType = new ArrayCollection();
  73.         $this->formType = new ArrayCollection();
  74.     }
  75.     public function getId(): ?int
  76.     {
  77.         return $this->id;
  78.     }
  79.     public function getName(): ?string
  80.     {
  81.         return $this->name;
  82.     }
  83.     public function setName(string $name): self
  84.     {
  85.         $this->name $name;
  86.         return $this;
  87.     }
  88.     public function getEntityUser(): ?int
  89.     {
  90.         return $this->entityUser;
  91.     }
  92.     public function setEntityUser(int $entityUser): self
  93.     {
  94.         $this->entityUser $entityUser;
  95.         return $this;
  96.     }
  97.     /**
  98.      * @param \DateTime $createdAt
  99.      *
  100.      * @ORM\PrePersist
  101.      */
  102.     public function setCreatedAt()
  103.     {
  104.         $this->createdAt = new \DateTime(date('Y-m-d H:i:s'));
  105.     }
  106.     /**
  107.      * @return \DateTime
  108.      */
  109.     public function getCreatedAt()
  110.     {
  111.         return $this->createdAt;
  112.     }
  113.     /**
  114.      * @param \DateTime $updatedAt
  115.      *
  116.      */
  117.     public function setUpdatedAt()
  118.     {
  119.         $this->updatedAt = new \DateTime(date('Y-m-d H:i:s'));
  120.     }
  121.     /**
  122.      * @return \DateTime
  123.      */
  124.     public function getUpdatedAt()
  125.     {
  126.         return $this->updatedAt;
  127.     }
  128.     /**
  129.      * @return mixed
  130.      */
  131.     public function getDocumentation()
  132.     {
  133.         return $this->documentation;
  134.     }
  135.     /**
  136.      * @param mixed $documentation
  137.      */
  138.     public function setDocumentation($documentation): void
  139.     {
  140.         $this->documentation $documentation;
  141.     }
  142.     /**
  143.      * @return mixed
  144.      */
  145.     public function getDescription()
  146.     {
  147.         return $this->description;
  148.     }
  149.     /**
  150.      * @param mixed $description
  151.      */
  152.     public function setDescription($description): void
  153.     {
  154.         $this->description $description;
  155.     }
  156.     /**
  157.      * @return bool
  158.      */
  159.     public function isRequiredInd(): bool
  160.     {
  161.         return $this->requiredInd;
  162.     }
  163.     /**
  164.      * @param bool $requiredInd
  165.      */
  166.     public function setRequiredInd(bool $requiredInd): void
  167.     {
  168.         $this->requiredInd $requiredInd;
  169.     }
  170.     /**
  171.      * @return bool
  172.      */
  173.     public function isActive()
  174.     {
  175.         return $this->active;
  176.     }
  177.     /**
  178.      * @param bool $active
  179.      */
  180.     public function setActive($active): void
  181.     {
  182.         $this->active $active;
  183.     }
  184.     /**
  185.      * @return ArrayCollection
  186.      */
  187.     public function getClassDocumentType(): ArrayCollection
  188.     {
  189.         return $this->classDocumentType;
  190.     }
  191.     /**
  192.      * @param ArrayCollection $classDocumentType
  193.      */
  194.     public function setClassDocumentType(ArrayCollection $classDocumentType): void
  195.     {
  196.         $this->classDocumentType $classDocumentType;
  197.     }
  198.     /**
  199.      * @return ArrayCollection
  200.      */
  201.     public function getFormType(): ArrayCollection
  202.     {
  203.         return $this->formType;
  204.     }
  205.     /**
  206.      * @param ArrayCollection $formType
  207.      */
  208.     public function setFormType(ArrayCollection $formType): void
  209.     {
  210.         $this->formType $formType;
  211.     }
  212.     /**
  213.      * @return mixed
  214.      */
  215.     public function getTenderBasis()
  216.     {
  217.         return $this->tenderBasis;
  218.     }
  219.     /**
  220.      * @param mixed $tenderBasis
  221.      */
  222.     public function setTenderBasis($tenderBasis): void
  223.     {
  224.         $this->tenderBasis $tenderBasis;
  225.     }
  226.     /**
  227.      * @return mixed
  228.      */
  229.     public function getProposalDocument()
  230.     {
  231.         return $this->proposalDocument;
  232.     }
  233.     /**
  234.      * @param mixed $proposalDocument
  235.      */
  236.     public function setProposalDocument($proposalDocument): void
  237.     {
  238.         $this->proposalDocument $proposalDocument;
  239.     }
  240.     public function getQualityUser(): ?User
  241.     {
  242.         return $this->qualityUser;
  243.     }
  244.     public function setQualityUser(?User $qualityUser): void
  245.     {
  246.         $this->qualityUser $qualityUser;
  247.     }
  248. }