<?php
// src/Entity/NiveauEtude.php
namespace App\Entity;
use App\Repository\NiveauEtudeRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: NiveauEtudeRepository::class)]
class NiveauEtude
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(type: 'datetime')]
private $date_debut_formation; // Nouveau champ pour la date de début de formation
#[ORM\Column(type: 'datetime')]
private $date_fin_formation; // Nouveau champ pour la date de fin de formation
#[ORM\Column(type: 'string', length: 50, nullable: true)]
private $diplome;
#[ORM\Column(type: 'string', length: 50)]
private $libelle;
#[ORM\Column(type: 'string', length: 50)]
private $categorie;
#[ORM\ManyToMany(targetEntity: Missions::class, mappedBy: 'niveau_etude')]
private $missions;
public function __construct()
{
$this->missions = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getDateDebutFormation(): ?\DateTimeInterface
{
return $this->date_debut_formation;
}
public function setDateDebutFormation(\DateTimeInterface $date_debut_formation): self
{
$this->date_debut_formation = $date_debut_formation;
return $this;
}
public function getDateFinFormation(): ?\DateTimeInterface
{
return $this->date_fin_formation;
}
public function setDateFinFormation(\DateTimeInterface $date_fin_formation): self
{
$this->date_fin_formation = $date_fin_formation;
return $this;
}
public function getDiplome(): ?string
{
return $this->diplome;
}
public function setDiplome(string $diplome): self
{
$this->diplome = $diplome;
return $this;
}
public function getLibelle(): ?string
{
return $this->libelle;
}
public function setLibelle(string $libelle): self
{
$this->libelle = $libelle;
return $this;
}
public function getCategorie(): ?string
{
return $this->categorie;
}
public function setCategorie(string $categorie): self
{
$this->categorie = $categorie;
return $this;
}
/**
* @return Collection<int, Missions>
*/
public function getMissions(): Collection
{
return $this->missions;
}
public function addMission(Missions $mission): self
{
if (!$this->missions->contains($mission)) {
$this->missions[] = $mission;
$mission->addNiveauEtude($this);
}
return $this;
}
public function removeMission(Missions $mission): self
{
if ($this->missions->removeElement($mission)) {
$mission->removeNiveauEtude($this);
}
return $this;
}
}