<?php
namespace App\Entity\Gestiform\Formations\Entreprise;
use App\Entity\AbstractEntity;
use App\Entity\Common\Adresse;
use App\Entity\Common\Upload;
use App\Entity\Gestiform\Admin\MasterListe\Masterlistelg;
use App\Entity\Gestiform\Admin\Tiers;
use App\Entity\Gestiform\Formations\Dossier\Dossier;
use App\Entity\Gestiform\Formations\Dossier\PersonalInformations;
use App\Repository\Gestiform\Formations\Entreprise\ContactRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=ContactRepository::class)
*/
class Contact extends AbstractEntity
{
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private bool $tuteur = false;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private ?int $niveau = null;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private ?bool $referentAdministratif = null;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private ?bool $responsableRH = false;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private ?bool $referentAbsences = null;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private ?bool $referentCommercial = null;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private ?bool $representantLegal = null;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private bool $principal = false;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private ?string $fonction = null;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private ?string $email = null;
/**
* @ORM\ManyToOne(targetEntity=PersonalInformations::class, cascade={"all"},inversedBy="contacts")
* @ORM\JoinColumn(nullable=true)
*/
private ?PersonalInformations $personalInformations = null;
/**
* @ORM\ManyToOne(targetEntity=Adresse::class, cascade={"all"})
* @ORM\JoinColumn(nullable=true)
*/
private ?Adresse $adresse = null;
/**
* @ORM\ManyToOne(targetEntity=Tiers::class,inversedBy="contacts")
* @ORM\JoinColumn(nullable=true)
*/
private ?Tiers $tiers = null;
/**
* @ORM\ManyToOne(targetEntity=Masterlistelg::class,cascade={"persist"})
* @ORM\JoinColumn(nullable=true)
*/
private ?Masterlistelg $typeResponsable = null;
/**
* @ORM\ManyToOne(targetEntity=Masterlistelg::class, cascade={"persist"})
* @ORM\JoinColumn(nullable=true)
*/
private ?Masterlistelg $niveauDiplome = null;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private ?string $diplomePlusEleve = null;
/**
* @ORM\OneToMany(targetEntity=Dossier::class, mappedBy="entrepriseContact",cascade={"persist"})
*/
private Collection $dossiers;
/**
* @ORM\OneToOne(targetEntity=Upload::class, cascade={"persist", "remove"})
* @ORM\JoinColumn(nullable=true)
*/
private ?Upload $cv = null;
public function __construct()
{
$this->dossiers = new ArrayCollection();
}
public function isTuteur(): bool
{
return $this->tuteur;
}
public function setTuteur(bool $tuteur): self
{
$this->tuteur = $tuteur;
return $this;
}
public function isReferentAdministratif(): ?bool
{
return $this->referentAdministratif;
}
public function setReferentAdministratif(?bool $referentAdministratif): self
{
$this->referentAdministratif = $referentAdministratif;
return $this;
}
public function isReferentAbsences(): ?bool
{
return $this->referentAbsences;
}
public function setReferentAbsences(?bool $referentAbsences): self
{
$this->referentAbsences = $referentAbsences;
return $this;
}
public function isReferentCommercial(): ?bool
{
return $this->referentCommercial;
}
public function setReferentCommercial(?bool $referentCommercial): self
{
$this->referentCommercial = $referentCommercial;
return $this;
}
public function isRepresentantLegal(): ?bool
{
return $this->representantLegal;
}
public function setRepresentantLegal(?bool $representantLegal): self
{
$this->representantLegal = $representantLegal;
return $this;
}
public function isPrincipal(): ?bool
{
return $this->principal;
}
public function setPrincipal(?bool $principal): self
{
$this->principal = $principal;
return $this;
}
public function getFonction(): ?string
{
return $this->fonction;
}
public function setFonction(?string $fonction): self
{
$this->fonction = $fonction;
return $this;
}
public function getPersonalInformations(): ?PersonalInformations
{
return $this->personalInformations;
}
public function setPersonalInformations(?PersonalInformations $personalInformations): self
{
$this->personalInformations = $personalInformations;
return $this;
}
public function getAdresse(): ?Adresse
{
return $this->adresse;
}
public function setAdresse(?Adresse $adresse): self
{
$this->adresse = $adresse;
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(?string $email): self
{
$this->email = $email;
return $this;
}
public function getTiers(): ?Tiers
{
return $this->tiers;
}
public function setTiers(?Tiers $tiers): self
{
$this->tiers = $tiers;
return $this;
}
public function getTypeResponsable(): ?Masterlistelg
{
return $this->typeResponsable;
}
public function setTypeResponsable(?Masterlistelg $typeResponsable): self
{
$this->typeResponsable = $typeResponsable;
return $this;
}
public function getNiveau(): ?int
{
return $this->niveau;
}
public function setNiveau(?int $niveau): self
{
$this->niveau = $niveau;
return $this;
}
public function getDiplomePlusEleve(): ?string
{
return $this->diplomePlusEleve;
}
public function setDiplomePlusEleve(?string $diplomePlusEleve): self
{
$this->diplomePlusEleve = $diplomePlusEleve;
return $this;
}
/**
* @return Collection<int, Dossier>
*/
public function getDossiers(): Collection
{
return $this->dossiers;
}
public function addDossier(Dossier $dossier): self
{
if (!$this->dossiers->contains($dossier)) {
$this->dossiers->add($dossier);
$dossier->setEntrepriseContact($this);
}
return $this;
}
public function removeDossier(Dossier $dossier): self
{
if ($this->dossiers->removeElement($dossier)) {
// set the owning side to null (unless already changed)
if ($dossier->getEntrepriseContact() === $this) {
$dossier->setEntrepriseContact(null);
}
}
return $this;
}
public function isResponsableRH(): ?bool
{
return $this->responsableRH;
}
public function setResponsableRH(?bool $responsableRH): self
{
$this->responsableRH = $responsableRH;
return $this;
}
public function getNiveauDiplome(): ?Masterlistelg
{
return $this->niveauDiplome;
}
public function setNiveauDiplome(?Masterlistelg $niveauDiplome): self
{
$this->niveauDiplome = $niveauDiplome;
return $this;
}
public function getCv(): ?Upload
{
return $this->cv;
}
public function setCv(?Upload $cv): self
{
$this->cv = $cv;
return $this;
}
}