<?php
namespace App\Entity;
use App\Repository\ProjetRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=ProjetRepository::class)
*/
class Projet
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\OneToMany(targetEntity=Apprenant::class, mappedBy="projet")
*/
private $apprenants;
/**
* @ORM\OneToMany(targetEntity=Communication::class, mappedBy="projet")
*/
private $communications;
/**
* @ORM\OneToMany(targetEntity=Compagne::class, mappedBy="projet")
*/
private $compagnes;
/**
* @ORM\OneToMany(targetEntity=Evolution::class, mappedBy="projet")
*/
private $evolutions;
/**
* @ORM\OneToMany(targetEntity=Inscription::class, mappedBy="projet")
*/
private $inscriptions;
/**
* @ORM\Column(type="integer")
*/
private $idProjet;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $code;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $nom;
/**
* @ORM\Column(type="date", nullable=true)
*/
private $date_lancement;
/**
* @ORM\Column(type="date", nullable=true)
*/
private $date_fin;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $effectif_prevu;
/**
* @ORM\OneToOne(targetEntity=StatProjet::class, cascade={"persist", "remove"})
* @ORM\JoinColumn(name="id_stat_projet")
*/
private $statProjet;
/**
* @ORM\ManyToOne(targetEntity=Client::class, inversedBy="projets")
* @ORM\JoinColumn(name="id_client", referencedColumnName="id", onDelete="CASCADE")
*/
private $client;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $descriptif;
/**
* @ORM\Column(name="listePopulation",type="string", length=255, nullable=true)
*/
private $listePopulation;
/**
* @ORM\ManyToOne(targetEntity=Utilisateur::class, inversedBy="projets")
* @ORM\JoinColumn(name="idCP", referencedColumnName="id")
*/
private $idCP;
/**
* @ORM\ManyToOne(targetEntity=Utilisateur::class, inversedBy="projets")
* @ORM\JoinColumn(name="idChargeProjet", referencedColumnName="id")
*/
private $idChargeProjet;
/**
* @ORM\OneToOne(targetEntity=CustomStatProjet::class, cascade={"persist", "remove"})
* @ORM\JoinColumn(name="id_custom_stat")
*/
private $customStatProjet;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $actif;
/**
* @ORM\Column(name="dateActif",type="string", length=255, nullable=true)
*/
private $dateActif;
/**
* @ORM\Column(name="dateMaj",type="string", length=255, nullable=true)
*/
private $dateMaj;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $groupe;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $type;
/**
* @ORM\Column(name="majApprenants",type="integer", nullable=true)
*/
private $majApprenants;
/**
* @ORM\ManyToMany(targetEntity=Cours::class, inversedBy="projets")
* @ORM\JoinColumn(name="idCourse", referencedColumnName="id")
*/
private $courses;
/**
* @ORM\ManyToMany(targetEntity=Formation::class, inversedBy="projets")
*/
private $formations;
/**
* @ORM\ManyToMany(targetEntity=Utilisateur::class, inversedBy="coachProjects")
* @ORM\JoinTable(name="projet_coach")
*/
private $coaches;
public function __construct()
{
$this->apprenants = new ArrayCollection();
$this->communications = new ArrayCollection();
$this->compagnes = new ArrayCollection();
$this->evolutions = new ArrayCollection();
$this->inscriptions = new ArrayCollection();
$this->courses = new ArrayCollection();
$this->formations = new ArrayCollection();
$this->coaches = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
/**
* @return Collection|Apprenant[]
*/
public function getApprenants(): Collection
{
return $this->apprenants;
}
public function addApprenant(Apprenant $apprenant): self
{
if (!$this->apprenants->contains($apprenant)) {
$this->apprenants[] = $apprenant;
$apprenant->setProjet($this);
}
return $this;
}
public function removeApprenant(Apprenant $apprenant): self
{
if ($this->apprenants->contains($apprenant)) {
$this->apprenants->removeElement($apprenant);
// set the owning side to null (unless already changed)
if ($apprenant->getProjet() === $this) {
$apprenant->setProjet(null);
}
}
return $this;
}
/**
* @return Collection|Communication[]
*/
public function getCommunications(): Collection
{
return $this->communications;
}
public function addCommunication(Communication $communication): self
{
if (!$this->communications->contains($communication)) {
$this->communications[] = $communication;
$communication->setProjet($this);
}
return $this;
}
public function removeCommunication(Communication $communication): self
{
if ($this->communications->contains($communication)) {
$this->communications->removeElement($communication);
// set the owning side to null (unless already changed)
if ($communication->getProjet() === $this) {
$communication->setProjet(null);
}
}
return $this;
}
/**
* @return Collection|Compagne[]
*/
public function getCompagnes(): Collection
{
return $this->compagnes;
}
public function addCompagne(Compagne $compagne): self
{
if (!$this->compagnes->contains($compagne)) {
$this->compagnes[] = $compagne;
$compagne->setProjet($this);
}
return $this;
}
public function removeCompagne(Compagne $compagne): self
{
if ($this->compagnes->contains($compagne)) {
$this->compagnes->removeElement($compagne);
// set the owning side to null (unless already changed)
if ($compagne->getProjet() === $this) {
$compagne->setProjet(null);
}
}
return $this;
}
/**
* @return Collection|Evolution[]
*/
public function getEvolutions(): Collection
{
return $this->evolutions;
}
public function addEvolution(Evolution $evolution): self
{
if (!$this->evolutions->contains($evolution)) {
$this->evolutions[] = $evolution;
$evolution->setProjet($this);
}
return $this;
}
public function removeEvolution(Evolution $evolution): self
{
if ($this->evolutions->contains($evolution)) {
$this->evolutions->removeElement($evolution);
// set the owning side to null (unless already changed)
if ($evolution->getProjet() === $this) {
$evolution->setProjet(null);
}
}
return $this;
}
/**
* @return Collection|Inscription[]
*/
public function getInscriptions(): Collection
{
return $this->inscriptions;
}
public function addInscription(Inscription $inscription): self
{
if (!$this->inscriptions->contains($inscription)) {
$this->inscriptions[] = $inscription;
$inscription->setProjet($this);
}
return $this;
}
public function removeInscription(Inscription $inscription): self
{
if ($this->inscriptions->contains($inscription)) {
$this->inscriptions->removeElement($inscription);
// set the owning side to null (unless already changed)
if ($inscription->getProjet() === $this) {
$inscription->setProjet(null);
}
}
return $this;
}
public function getIdProjet(): ?int
{
return $this->idProjet;
}
public function setIdProjet(int $idProjet): self
{
$this->idProjet = $idProjet;
return $this;
}
public function getCode(): ?string
{
return $this->code;
}
public function setCode(?string $code): self
{
$this->code = $code;
return $this;
}
public function getNom(): ?string
{
return $this->nom;
}
public function setNom(?string $nom): self
{
$this->nom = $nom;
return $this;
}
public function getDateLancement(): ?\DateTimeInterface
{
return $this->date_lancement;
}
public function setDateLancement(?\DateTimeInterface $date_lancement): self
{
$this->date_lancement = $date_lancement;
return $this;
}
public function getDateFin(): ?\DateTimeInterface
{
return $this->date_fin;
}
public function setDateFin(?\DateTimeInterface $date_fin): self
{
$this->date_fin = $date_fin;
return $this;
}
public function getEffectifPrevu(): ?int
{
return $this->effectif_prevu;
}
public function setEffectifPrevu(?int $effectif_prevu): self
{
$this->effectif_prevu = $effectif_prevu;
return $this;
}
public function getStatProjet(): ?StatProjet
{
return $this->statProjet;
}
public function setStatProjet(?StatProjet $statProjet): self
{
$this->statProjet = $statProjet;
return $this;
}
public function getClient(): ?Client
{
return $this->client;
}
public function setClient(?Client $client): self
{
$this->client = $client;
return $this;
}
public function getDescriptif(): ?string
{
return $this->descriptif;
}
public function setDescriptif(?string $descriptif): self
{
$this->descriptif = $descriptif;
return $this;
}
public function getListePopulation(): ?string
{
return $this->listePopulation;
}
public function setListePopulation(?string $listePopulation): self
{
$this->listePopulation = $listePopulation;
return $this;
}
public function getIdCP(): ?Utilisateur
{
return $this->idCP;
}
public function setIdCP(?Utilisateur $idCP): self
{
$this->idCP = $idCP;
return $this;
}
public function getIdChargeProjet(): ?Utilisateur
{
return $this->idChargeProjet;
}
public function setIdChargeProjet(?Utilisateur $idChargeProjet): self
{
$this->idChargeProjet = $idChargeProjet;
return $this;
}
public function getCustomStatProjet(): ?CustomStatProjet
{
return $this->customStatProjet;
}
public function setCustomStatProjet(?CustomStatProjet $customStatProjet): self
{
$this->customStatProjet = $customStatProjet;
return $this;
}
public function getActif(): ?int
{
return $this->actif;
}
public function setActif(?int $actif): self
{
$this->actif = $actif;
return $this;
}
public function getDateActif(): ?string
{
return $this->dateActif;
}
public function setDateActif(?string $dateActif): self
{
$this->dateActif = $dateActif;
return $this;
}
public function getDateMaj(): ?string
{
return $this->dateMaj;
}
public function setDateMaj(?string $dateMaj): self
{
$this->dateMaj = $dateMaj;
return $this;
}
public function getGroupe(): ?int
{
return $this->groupe;
}
public function setGroupe(?int $groupe): self
{
$this->groupe = $groupe;
return $this;
}
public function getType(): ?int
{
return $this->type;
}
public function setType(?int $type): self
{
$this->type = $type;
return $this;
}
public function getMajApprenants(): ?int
{
return $this->majApprenants;
}
public function setMajApprenants(?int $majApprenants): self
{
$this->majApprenants = $majApprenants;
return $this;
}
/**
* @return Collection|Cours[]
*/
public function getCourses(): Collection
{
return $this->courses;
}
public function addCourse(Cours $course): self
{
if (!$this->courses->contains($course)) {
$this->courses[] = $course;
}
return $this;
}
public function removeCourse(Cours $course): self
{
if ($this->courses->contains($course)) {
$this->courses->removeElement($course);
}
return $this;
}
/**
* @return Collection|Formation[]
*/
public function getFormations(): Collection
{
return $this->formations;
}
public function addFormation(Formation $formation): self
{
if (!$this->formations->contains($formation)) {
$this->formations[] = $formation;
}
return $this;
}
public function removeFormation(Formation $formation): self
{
$this->formations->removeElement($formation);
return $this;
}
/**
* @return Collection|Utilisateur[]
*/
public function getCoaches(): Collection
{
return $this->coaches;
}
public function addCoach(Utilisateur $coache): self
{
if (!$this->coaches->contains($coache)) {
$this->coaches[] = $coache;
}
return $this;
}
public function removeCoach(Utilisateur $coache): self
{
$this->coaches->removeElement($coache);
return $this;
}
}