<?php
namespace App\Entity;
use App\Repository\MissionsRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: MissionsRepository::class)]
class Missions
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(type: 'string', length: 50, nullable: true)]
private $entreprise_concernee;
#[ORM\Column(type: 'text')]
private $contexte;
#[ORM\Column(type: 'text')]
private $objectifs;
#[ORM\Column(type: 'text', nullable: true)]
private $livrable;
#[ORM\Column(type: 'date')]
private $date_debut;
#[ORM\Column(type: 'integer')]
private $duree;
#[ORM\Column(type: 'string', length: 50, nullable: true)]
private $unite_duree;
#[ORM\Column(type: 'float', nullable: true)]
private $budget;
#[ORM\Column(type: 'integer')]
private $experience_dmd;
#[ORM\Column(type: 'string', length: 50, nullable: true)]
private $niveau_etude_dmd;
#[ORM\Column(type: 'string', length: 50, nullable: true)]
private $auteur_mission;
#[ORM\Column(type: 'string', length: 50)]
private $reference_mission;
#[ORM\Column(type: 'datetime')]
private $date_publication;
#[ORM\Column(type: 'boolean')]
private $statut = true;
#[ORM\Column(type: 'string', length: 50, nullable: true)]
private $CRA;
#[ORM\Column(type: 'string', length: 50, nullable: true)]
private $facture;
#[ORM\ManyToOne(targetEntity: Localisation::class, inversedBy: 'missions')]
private $localisation;
#[ORM\ManyToMany(targetEntity: Metiers::class, inversedBy: 'missions')]
private $metier;
#[ORM\ManyToMany(targetEntity: NiveauEtude::class, inversedBy: 'missions')]
private $niveau_etude;
#[ORM\ManyToMany(targetEntity: Competences::class, inversedBy: 'missions')]
private $competence;
#[ORM\OneToMany(mappedBy: 'mission', targetEntity: ReponsesAO::class)]
private $reponsesAOs;
#[ORM\ManyToOne(targetEntity: Administrateurs::class, inversedBy: 'missions')]
private $admin;
#[ORM\ManyToOne(targetEntity: Consultants::class, inversedBy: 'missions')]
private $consultant;
#[ORM\ManyToOne(targetEntity: Comerciaux::class, inversedBy: 'missions')]
private $commercial;
#[ORM\OneToMany(mappedBy: 'mission', targetEntity: EvaluationCON::class)]
private $evaluationCONs;
#[ORM\OneToMany(mappedBy: 'mission', targetEntity: EvaluationCOM::class)]
private $evaluationCOMs;
#[ORM\Column(type: 'string', length: 255)]
private $titre;
#[ORM\ManyToOne(targetEntity: Entreprises::class, inversedBy: 'missions')]
private $entreprise;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $modalite;
#[ORM\Column(type: 'string', length: 100, nullable: true)]
private $ville;
#[ORM\Column(type: 'string', length: 20, nullable: true)]
private $cp;
#[ORM\Column(type: 'blob', nullable: true)]
private $logo_client;
#[ORM\Column(nullable: true)]
private ?bool $confidentialite = null;
#[ORM\ManyToMany(targetEntity: Consultants::class, inversedBy: 'favoris')]
private Collection $favoris;
public function __construct()
{
$this->metier = new ArrayCollection();
$this->niveau_etude = new ArrayCollection();
$this->competence = new ArrayCollection();
$this->reponsesAOs = new ArrayCollection();
$this->evaluationCONs = new ArrayCollection();
$this->evaluationCOMs = new ArrayCollection();
$this->favoris = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getEntrepriseConcernee(): ?string
{
return $this->entreprise_concernee;
}
public function setEntrepriseConcernee(?string $entreprise_concernee): self
{
$this->entreprise_concernee = $entreprise_concernee;
return $this;
}
public function getContexte(): ?string
{
return $this->contexte;
}
public function setContexte(string $contexte): self
{
$this->contexte = $contexte;
return $this;
}
public function getObjectifs(): ?string
{
return $this->objectifs;
}
public function setObjectifs(string $objectifs): self
{
$this->objectifs = $objectifs;
return $this;
}
public function getLivrable(): ?string
{
return $this->livrable;
}
public function setLivrable(?string $livrable): self
{
$this->livrable = $livrable;
return $this;
}
public function getDateDebut(): ?\DateTimeInterface
{
return $this->date_debut;
}
public function setDateDebut(\DateTimeInterface $date_debut): self
{
$this->date_debut = $date_debut;
return $this;
}
public function getDuree(): ?int
{
return $this->duree;
}
public function setDuree(int $duree): self
{
$this->duree = $duree;
return $this;
}
public function getUniteDuree(): ?string
{
return $this->unite_duree;
}
public function setUniteDuree(string $unite_duree): self
{
$this->unite_duree = $unite_duree;
return $this;
}
public function getBudget(): ?float
{
return $this->budget;
}
public function setBudget(float $budget): self
{
$this->budget = $budget;
return $this;
}
public function getExperienceDmd(): ?int
{
return $this->experience_dmd;
}
public function setExperienceDmd(int $experience_dmd): self
{
$this->experience_dmd = $experience_dmd;
return $this;
}
public function getNiveauEtudeDmd(): ?string
{
return $this->niveau_etude_dmd;
}
public function setNiveauEtudeDmd(?string $niveau_etude_dmd): self
{
$this->niveau_etude_dmd = $niveau_etude_dmd;
return $this;
}
public function getAuteurMission(): ?string
{
return $this->auteur_mission;
}
public function setAuteurMission(?string $auteur_mission): self
{
$this->auteur_mission = $auteur_mission;
return $this;
}
public function getReferenceMission(): ?string
{
return $this->reference_mission;
}
public function setReferenceMission(string $reference_mission): self
{
$this->reference_mission = $reference_mission;
return $this;
}
public function getDatePublication(): ?\DateTimeInterface
{
return $this->date_publication;
}
public function setDatePublication(\DateTimeInterface $date_publication): self
{
$this->date_publication = $date_publication;
return $this;
}
public function getStatut(): ?bool
{
return $this->statut;
}
public function setStatut(bool $statut): self
{
$this->statut = $statut;
return $this;
}
public function getCRA(): ?string
{
return $this->CRA;
}
public function setCRA(string $CRA): self
{
$this->CRA = $CRA;
return $this;
}
public function getFacture(): ?string
{
return $this->facture;
}
public function setFacture(?string $facture): self
{
$this->facture = $facture;
return $this;
}
public function getLocalisation(): ?Localisation
{
return $this->localisation;
}
public function setLocalisation(?Localisation $localisation): self
{
$this->localisation = $localisation;
return $this;
}
/**
* @return Collection<int, Metiers>
*/
public function getMetier(): Collection
{
return $this->metier;
}
public function addMetier(Metiers $metier): self
{
if (!$this->metier->contains($metier)) {
$this->metier[] = $metier;
}
return $this;
}
public function removeMetier(Metiers $metier): self
{
$this->metier->removeElement($metier);
return $this;
}
/**
* @return Collection<int, NiveauEtude>
*/
public function getNiveauEtude(): Collection
{
return $this->niveau_etude;
}
public function addNiveauEtude(NiveauEtude $niveauEtude): self
{
if (!$this->niveau_etude->contains($niveauEtude)) {
$this->niveau_etude[] = $niveauEtude;
}
return $this;
}
public function removeNiveauEtude(NiveauEtude $niveauEtude): self
{
$this->niveau_etude->removeElement($niveauEtude);
return $this;
}
/**
* @return Collection<int, Competences>
*/
public function getCompetence(): Collection
{
return $this->competence;
}
public function addCompetence(Competences $competence): self
{
if (!$this->competence->contains($competence)) {
$this->competence[] = $competence;
}
return $this;
}
public function removeCompetence(Competences $competence): self
{
$this->competence->removeElement($competence);
return $this;
}
/**
* @return Collection<int, ReponsesAO>
*/
public function getReponsesAOs(): Collection
{
return $this->reponsesAOs;
}
public function addReponsesAO(ReponsesAO $reponsesAO): self
{
if (!$this->reponsesAOs->contains($reponsesAO)) {
$this->reponsesAOs[] = $reponsesAO;
$reponsesAO->setMission($this);
}
return $this;
}
public function removeReponsesAO(ReponsesAO $reponsesAO): self
{
if ($this->reponsesAOs->removeElement($reponsesAO)) {
// set the owning side to null (unless already changed)
if ($reponsesAO->getMission() === $this) {
$reponsesAO->setMission(null);
}
}
return $this;
}
public function getAdmin(): ?Administrateurs
{
return $this->admin;
}
public function setAdmin(?Administrateurs $admin): self
{
$this->admin = $admin;
return $this;
}
public function getConsultant(): ?Consultants
{
return $this->consultant;
}
public function setConsultant(?Consultants $consultant): self
{
$this->consultant = $consultant;
return $this;
}
public function getCommercial(): ?Comerciaux
{
return $this->commercial;
}
public function setCommercial(?Comerciaux $commercial): self
{
$this->commercial = $commercial;
return $this;
}
/**
* @return Collection<int, EvaluationCON>
*/
public function getEvaluationCONs(): Collection
{
return $this->evaluationCONs;
}
public function addEvaluationCON(EvaluationCON $evaluationCON): self
{
if (!$this->evaluationCONs->contains($evaluationCON)) {
$this->evaluationCONs[] = $evaluationCON;
$evaluationCON->setMission($this);
}
return $this;
}
public function removeEvaluationCON(EvaluationCON $evaluationCON): self
{
if ($this->evaluationCONs->removeElement($evaluationCON)) {
// set the owning side to null (unless already changed)
if ($evaluationCON->getMission() === $this) {
$evaluationCON->setMission(null);
}
}
return $this;
}
/**
* @return Collection<int, EvaluationCOM>
*/
public function getEvaluationCOMs(): Collection
{
return $this->evaluationCOMs;
}
public function addEvaluationCOM(EvaluationCOM $evaluationCOM): self
{
if (!$this->evaluationCOMs->contains($evaluationCOM)) {
$this->evaluationCOMs[] = $evaluationCOM;
$evaluationCOM->setMission($this);
}
return $this;
}
public function removeEvaluationCOM(EvaluationCOM $evaluationCOM): self
{
if ($this->evaluationCOMs->removeElement($evaluationCOM)) {
// set the owning side to null (unless already changed)
if ($evaluationCOM->getMission() === $this) {
$evaluationCOM->setMission(null);
}
}
return $this;
}
public function getTitre(): ?string
{
return $this->titre;
}
public function setTitre(string $titre): self
{
$this->titre = $titre;
return $this;
}
public function getEntreprise(): ?Entreprises
{
return $this->entreprise;
}
public function setEntreprise(?Entreprises $entreprise): self
{
$this->entreprise = $entreprise;
return $this;
}
public function getModalite(): ?string
{
return $this->modalite;
}
public function setModalite(?string $modalite): self
{
$this->modalite = $modalite;
return $this;
}
public function getVille(): ?string
{
return $this->ville;
}
public function setVille(?string $ville): self
{
$this->ville = $ville;
return $this;
}
public function getCp(): ?string
{
return $this->cp;
}
public function setCp(?string $cp): self
{
$this->cp = $cp;
return $this;
}
public function getLogoClient()
{
return $this->logo_client;
}
public function setLogoClient($logo_client): self
{
$this->logo_client = $logo_client;
return $this;
}
public function isConfidentialite(): ?bool
{
return $this->confidentialite;
}
public function setConfidentialite(?bool $confidentialite): static
{
$this->confidentialite = $confidentialite;
return $this;
}
/**
* @return Collection<int, Consultants>
*/
public function getFavoris(): Collection
{
return $this->favoris;
}
public function addFavori(Consultants $favori): static
{
if (!$this->favoris->contains($favori)) {
$this->favoris->add($favori);
}
return $this;
}
public function removeFavori(Consultants $favori): static
{
$this->favoris->removeElement($favori);
return $this;
}
}