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'text'nullabletrue)]
  17.     private ?string $programme null;
  18.     #[ORM\Column(type'text'nullabletrue)]
  19.     private ?string $certification null;
  20.     #[ORM\Column(type'decimal'precision10scale2nullabletrue)]
  21.     private ?string $tarifVente null;
  22.     #[ORM\ManyToOne(targetEntityEditeur::class, inversedBy'certifications')]
  23.     #[ORM\JoinColumn(name'editeur_id'referencedColumnName'id'onDelete'SET NULL')]
  24.     private ?Editeur $editeur null;
  25.     #[ORM\ManyToOne(targetEntityTheme::class, inversedBy'certifications')]
  26.     #[ORM\JoinColumn(nullabletrueonDelete'SET NULL')]
  27.     private ?Theme $theme=null;
  28.     #[ORM\ManyToMany(targetEntityModule::class, mappedBy'certifications')]
  29.     private Collection $modules;
  30.     public function __construct()
  31.     {
  32.         parent::__construct();
  33.         $this->modules = new ArrayCollection();
  34.     }
  35.     public function getDateInscription(): ?DateTime
  36.     {
  37.         return $this->dateInscription;
  38.     }
  39.     public function setDateInscription(?DateTime $dateinscription): self
  40.     {
  41.         $this->dateInscription $dateinscription;
  42.         return $this;
  43.     }
  44.     public function getEditeur(): ?Editeur
  45.     {
  46.         return $this->editeur;
  47.     }
  48.     public function setEditeur(?Editeur $editeur): self
  49.     {
  50.         $this->editeur $editeur;
  51.         return $this;
  52.     }
  53.     public function getTheme(): ?Theme
  54.     {
  55.         return $this->theme;
  56.     }
  57.     public function setTheme(?Theme $theme): self
  58.     {
  59.         $this->theme $theme;
  60.         return $this;
  61.     }
  62.     public function getProgramme(): ?string
  63.     {
  64.         return $this->programme;
  65.     }
  66.     public function setProgramme(?string $programme): self
  67.     {
  68.         $this->programme $programme;
  69.         return $this;
  70.     }
  71.     public function getTarifVente(): ?float
  72.     {
  73.         return $this->tarifVente;
  74.     }
  75.     public function setTarifVente(?float $tarifVente): self
  76.     {
  77.         $this->tarifVente $tarifVente;
  78.         return $this;
  79.     }
  80.     /**
  81.      * @return Collection<int, Module>
  82.      */
  83.     public function getModules(): Collection
  84.     {
  85.         return $this->modules;
  86.     }
  87.     public function addModule(Module $module): self
  88.     {
  89.         if (!$this->modules->contains($module)) {
  90.             $this->modules->add($module);
  91.         }
  92.         return $this;
  93.     }
  94.     public function removeModule(Module $module): self
  95.     {
  96.         $this->modules->removeElement($module);
  97.         return $this;
  98.     }
  99.     public function getCertification(): ?string
  100.     {
  101.         return $this->certification;
  102.     }
  103.     public function setCertification(?string $certification): self
  104.     {
  105.         $this->certification $certification;
  106.         return $this;
  107.     }
  108. }