src/Entity/CertCertificat.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CertCertificatRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=CertCertificatRepository::class)
  9.  */
  10. class CertCertificat
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="datetime_immutable")
  20.      */
  21.     private $createdAt;
  22.     /**
  23.      * @ORM\Column(type="text", nullable=true)
  24.      */
  25.     private $comment;
  26.     /**
  27.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="certCertificats")
  28.      * @ORM\JoinColumn(nullable=false)
  29.      */
  30.     private $user;
  31.     /**
  32.      * @ORM\ManyToOne(targetEntity=IctusPharmacie::class, inversedBy="certCertificats")
  33.      * @ORM\JoinColumn(nullable=false)
  34.      */
  35.     private $pharmacie;
  36.     /**
  37.      * @ORM\ManyToOne(targetEntity=CertModel::class, inversedBy="certCertificats")
  38.      * @ORM\JoinColumn(nullable=false)
  39.      */
  40.     private $model;
  41.     /**
  42.      * @ORM\OneToOne(targetEntity=CertResultFinal::class, inversedBy="certCertificat", cascade={"persist", "remove"})
  43.      */
  44.     private $resultFinal;
  45.     /**
  46.      * @ORM\OneToMany(targetEntity=CertResultDetail::class, mappedBy="certificat", orphanRemoval=true)
  47.      */
  48.     private $certResultDetails;
  49.     /**
  50.      * @ORM\Column(type="string", length=255, nullable=true)
  51.      */
  52.     private $toolLot;
  53.     /**
  54.      * @ORM\Column(type="date", nullable=true)
  55.      */
  56.     private $toolExpiration;
  57.     /**
  58.      * @ORM\Column(type="string", length=255, nullable=true)
  59.      */
  60.     private $tool;
  61.     /**
  62.      * @ORM\Column(type="integer", length=24)
  63.      */
  64.     private $reference;
  65.     public function __construct()
  66.     {
  67.         $this->createdAt = new \DateTimeImmutable();
  68.         $this->certResultDetails = new ArrayCollection();
  69.     }
  70.     public function getId(): ?int
  71.     {
  72.         return $this->id;
  73.     }
  74.     public function getCreatedAt(): ?\DateTimeImmutable
  75.     {
  76.         return $this->createdAt;
  77.     }
  78.     public function setCreatedAt(\DateTimeImmutable $createdAt): self
  79.     {
  80.         $this->createdAt $createdAt;
  81.         return $this;
  82.     }
  83.     public function getComment(): ?string
  84.     {
  85.         return $this->comment;
  86.     }
  87.     public function setComment(?string $comment): self
  88.     {
  89.         $this->comment $comment;
  90.         return $this;
  91.     }
  92.     public function getUser(): ?User
  93.     {
  94.         return $this->user;
  95.     }
  96.     public function setUser(?User $user): self
  97.     {
  98.         $this->user $user;
  99.         return $this;
  100.     }
  101.     public function getPharmacie(): ?IctusPharmacie
  102.     {
  103.         return $this->pharmacie;
  104.     }
  105.     public function setPharmacie(?IctusPharmacie $pharmacie): self
  106.     {
  107.         $this->pharmacie $pharmacie;
  108.         return $this;
  109.     }
  110.     public function getModel(): ?CertModel
  111.     {
  112.         return $this->model;
  113.     }
  114.     public function setModel(?CertModel $model): self
  115.     {
  116.         $this->model $model;
  117.         return $this;
  118.     }
  119.     public function getResultFinal(): ?CertResultFinal
  120.     {
  121.         return $this->resultFinal;
  122.     }
  123.     public function setResultFinal(?CertResultFinal $resultFinal): self
  124.     {
  125.         $this->resultFinal $resultFinal;
  126.         return $this;
  127.     }
  128.     /**
  129.      * @return Collection<int, CertResultDetail>
  130.      */
  131.     public function getCertResultDetails(): Collection
  132.     {
  133.         return $this->certResultDetails;
  134.     }
  135.     public function addCertResultDetail(CertResultDetail $certResultDetail): self
  136.     {
  137.         if (!$this->certResultDetails->contains($certResultDetail)) {
  138.             $this->certResultDetails[] = $certResultDetail;
  139.             $certResultDetail->setCertificat($this);
  140.         }
  141.         return $this;
  142.     }
  143.     public function removeCertResultDetail(CertResultDetail $certResultDetail): self
  144.     {
  145.         if ($this->certResultDetails->removeElement($certResultDetail)) {
  146.             // set the owning side to null (unless already changed)
  147.             if ($certResultDetail->getCertificat() === $this) {
  148.                 $certResultDetail->setCertificat(null);
  149.             }
  150.         }
  151.         return $this;
  152.     }
  153.     public function getToolLot(): ?string
  154.     {
  155.         return $this->toolLot;
  156.     }
  157.     public function setToolLot(?string $toolLot): self
  158.     {
  159.         $this->toolLot $toolLot;
  160.         return $this;
  161.     }
  162.     public function getToolExpiration(): ?\DateTimeInterface
  163.     {
  164.         return $this->toolExpiration;
  165.     }
  166.     public function setToolExpiration(?\DateTimeInterface $toolExpiration): self
  167.     {
  168.         $this->toolExpiration $toolExpiration;
  169.         return $this;
  170.     }
  171.     public function getTool(): ?string
  172.     {
  173.         return $this->tool;
  174.     }
  175.     public function setTool(?string $tool): self
  176.     {
  177.         $this->tool $tool;
  178.         return $this;
  179.     }
  180.     public function getReference(): ?string
  181.     {
  182.         return $this->reference;
  183.     }
  184.     public function setReference(string $reference): self
  185.     {
  186.         $this->reference $reference;
  187.         return $this;
  188.     }
  189. }