src/Entity/NiveauEtude.php line 12

Open in your IDE?
  1. <?php
  2. // src/Entity/NiveauEtude.php
  3. namespace App\Entity;
  4. use App\Repository\NiveauEtudeRepository;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassNiveauEtudeRepository::class)]
  9. class NiveauEtude
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column(type'integer')]
  14.     private $id;
  15.     #[ORM\Column(type'datetime')]
  16.     private $date_debut_formation// Nouveau champ pour la date de début de formation
  17.     #[ORM\Column(type'datetime')]
  18.     private $date_fin_formation// Nouveau champ pour la date de fin de formation
  19.     #[ORM\Column(type'string'length50nullabletrue)]
  20.     private $diplome;
  21.     #[ORM\Column(type'string'length50)]
  22.     private $libelle;
  23.     #[ORM\Column(type'string'length50)]
  24.     private $categorie;
  25.     #[ORM\ManyToMany(targetEntityMissions::class, mappedBy'niveau_etude')]
  26.     private $missions;
  27.     public function __construct()
  28.     {
  29.         $this->missions = new ArrayCollection();
  30.     }
  31.     public function getId(): ?int
  32.     {
  33.         return $this->id;
  34.     }
  35.     public function getDateDebutFormation(): ?\DateTimeInterface
  36.     {
  37.         return $this->date_debut_formation;
  38.     }
  39.     public function setDateDebutFormation(\DateTimeInterface $date_debut_formation): self
  40.     {
  41.         $this->date_debut_formation $date_debut_formation;
  42.         return $this;
  43.     }
  44.     public function getDateFinFormation(): ?\DateTimeInterface
  45.     {
  46.         return $this->date_fin_formation;
  47.     }
  48.     public function setDateFinFormation(\DateTimeInterface $date_fin_formation): self
  49.     {
  50.         $this->date_fin_formation $date_fin_formation;
  51.         return $this;
  52.     }
  53.     public function getDiplome(): ?string
  54.     {
  55.         return $this->diplome;
  56.     }
  57.     public function setDiplome(string $diplome): self
  58.     {
  59.         $this->diplome $diplome;
  60.         return $this;
  61.     }
  62.     public function getLibelle(): ?string
  63.     {
  64.         return $this->libelle;
  65.     }
  66.     public function setLibelle(string $libelle): self
  67.     {
  68.         $this->libelle $libelle;
  69.         return $this;
  70.     }
  71.     public function getCategorie(): ?string
  72.     {
  73.         return $this->categorie;
  74.     }
  75.     public function setCategorie(string $categorie): self
  76.     {
  77.         $this->categorie $categorie;
  78.         return $this;
  79.     }
  80.     /**
  81.      * @return Collection<int, Missions>
  82.      */
  83.     public function getMissions(): Collection
  84.     {
  85.         return $this->missions;
  86.     }
  87.     public function addMission(Missions $mission): self
  88.     {
  89.         if (!$this->missions->contains($mission)) {
  90.             $this->missions[] = $mission;
  91.             $mission->addNiveauEtude($this);
  92.         }
  93.         return $this;
  94.     }
  95.     public function removeMission(Missions $mission): self
  96.     {
  97.         if ($this->missions->removeElement($mission)) {
  98.             $mission->removeNiveauEtude($this);
  99.         }
  100.         return $this;
  101.     }
  102. }