src/Entity/Gestiform/Formations/Catalogue/Certification.php line 16

  1. <?php
  2. namespace App\Entity\Gestiform\Formations\Catalogue;
  3. use DateTime;
  4. use App\Entity\Gestiform\Formations\Catalogue\Module\Module;
  5. use App\Entity\Gestiform\Formations\Catalogue\Theme\Theme;
  6. use App\Repository\Gestiform\Formations\Catalogue\CertificationRepository;
  7. use Doctrine\Common\Collections\ArrayCollection;
  8. use Doctrine\Common\Collections\Collection;
  9. use Doctrine\ORM\Mapping as ORM;
  10. #[ORM\Table(name'certification')]
  11. #[ORM\Entity(repositoryClassCertificationRepository::class)]
  12. class Certification extends Module
  13. {
  14.     #[ORM\Column(type'datetime'length255nullabletrue)]
  15.     private ?DateTime $dateInscription null;
  16.     #[ORM\Column(type'string'length255nullabletrue)]
  17.     private ?string $programme null;
  18.     #[ORM\Column(type'string'length255nullabletrue)]
  19.     private ?string $certification null;
  20.     #[ORM\Column(type'decimal'precision10scale2nullabletrue)]
  21.     private ?string $tarifVente null;
  22.     #[ORM\ManyToOne(targetEntityEditeur::class, inversedBy'certifications')]
  23.     private Editeur $editeur;
  24.     #[ORM\ManyToOne(targetEntityTheme::class, inversedBy'certifications')]
  25.     private Theme $theme;
  26.     #[ORM\ManyToMany(targetEntityModule::class, mappedBy'certifications')]
  27.     private Collection $modules;
  28.     public function __construct()
  29.     {
  30.         parent::__construct();
  31.         $this->modules = new ArrayCollection();
  32.     }
  33.     public function getDateInscription(): ?DateTime
  34.     {
  35.         return $this->dateInscription;
  36.     }
  37.     public function setDateInscription(?DateTime $dateinscription): self
  38.     {
  39.         $this->dateInscription $dateinscription;
  40.         return $this;
  41.     }
  42.     public function getEditeur(): ?Editeur
  43.     {
  44.         return $this->editeur;
  45.     }
  46.     public function setEditeur(?Editeur $editeur): self
  47.     {
  48.         $this->editeur $editeur;
  49.         return $this;
  50.     }
  51.     public function getTheme(): ?Theme
  52.     {
  53.         return $this->theme;
  54.     }
  55.     public function setTheme(?Theme $theme): self
  56.     {
  57.         $this->theme $theme;
  58.         return $this;
  59.     }
  60.     public function getProgramme(): ?string
  61.     {
  62.         return $this->programme;
  63.     }
  64.     public function setProgramme(?string $programme): self
  65.     {
  66.         $this->programme $programme;
  67.         return $this;
  68.     }
  69.     public function getTarifVente(): ?float
  70.     {
  71.         return $this->tarifVente;
  72.     }
  73.     public function setTarifVente(?float $tarifVente): self
  74.     {
  75.         $this->tarifVente $tarifVente;
  76.         return $this;
  77.     }
  78.     /**
  79.      * @return Collection<int, Module>
  80.      */
  81.     public function getModules(): Collection
  82.     {
  83.         return $this->modules;
  84.     }
  85.     public function addModule(Module $module): self
  86.     {
  87.         if (!$this->modules->contains($module)) {
  88.             $this->modules->add($module);
  89.         }
  90.         return $this;
  91.     }
  92.     public function removeModule(Module $module): self
  93.     {
  94.         $this->modules->removeElement($module);
  95.         return $this;
  96.     }
  97.     public function getCertification(): ?string
  98.     {
  99.         return $this->certification;
  100.     }
  101.     public function setCertification(?string $certification): self
  102.     {
  103.         $this->certification $certification;
  104.         return $this;
  105.     }
  106. }