<?php
namespace App\Entity;
use App\Repository\InstallateurRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=InstallateurRepository::class)
*/
class Installateur
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $nom;
/**
* @ORM\Column(type="string", length=255)
*/
private $prenom;
/**
* @ORM\Column(type="string", length=255)
*/
private $societe;
/**
* @ORM\Column(type="string", length=255)
*/
private $phone;
/**
* @ORM\Column(type="string", length=255)
*/
private $email;
/**
* @ORM\Column(type="string", length=255,nullable=true)
*/
private $photo;
/**
* @ORM\Column(type="string", length=255,nullable=true)
*/
private $adresse;
/**
* @ORM\Column(type="string", length=255)
*/
private $status;
/**
* @ORM\ManyToMany(targetEntity=OperationStandard::class, mappedBy="operationstandard")
*/
private $operationStandards;
/**
* @ORM\OneToMany(targetEntity=Deal::class, mappedBy="installateur")
*/
private $deals;
/**
* @ORM\OneToMany(targetEntity=ContratSigne::class, mappedBy="installateur")
*/
private $contratSignes;
/**
* @ORM\OneToMany(targetEntity=ChampsInstallateur::class, mappedBy="installateur")
*/
private $champsinstallateur;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $commentaire;
/**
* @ORM\OneToOne(targetEntity=User::class, inversedBy="installateur", cascade={"persist", "remove"})
*/
private $user;
/**
* @ORM\OneToMany(targetEntity=Soustraitant::class, mappedBy="installateur")
*/
private $soustraitants;
/**
* @ORM\OneToMany(targetEntity=ActiviteDeal::class, mappedBy="installateur")
*/
private $activiteDeals;
/**
* @ORM\OneToMany(targetEntity=ActiviteDossier::class, mappedBy="installateur")
*/
private $activiteDossiers;
/**
* @ORM\OneToMany(targetEntity=CommentaireInstalleur::class, mappedBy="installeur")
*/
private $commentaireInstalleurs;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $archive;
/**
* @ORM\ManyToOne(targetEntity=Equipe::class, inversedBy="installateurs")
*/
private $equipe;
/**
* @ORM\OneToMany(targetEntity=ContactInstallateur::class, mappedBy="installateur")
*/
private $contactInstallateurs;
/**
* @ORM\OneToMany(targetEntity=Docfacture::class, mappedBy="installateur")
*/
private $docfactures;
public function __construct()
{
$this->operationStandards = new ArrayCollection();
$this->deals = new ArrayCollection();
$this->contratSignes = new ArrayCollection();
$this->champsinstallateur = new ArrayCollection();
$this->soustraitants = new ArrayCollection();
$this->activiteDeals = new ArrayCollection();
$this->activiteDossiers = new ArrayCollection();
$this->commentaireInstalleurs = new ArrayCollection();
$this->contactInstallateurs = new ArrayCollection();
$this->docfactures = new ArrayCollection();
}
public function __toString()
{
return $this->societe;
}
public function getId(): ?int
{
return $this->id;
}
public function getNom(): ?string
{
return $this->nom;
}
public function setNom(string $nom): self
{
$this->nom = $nom;
return $this;
}
public function getPrenom(): ?string
{
return $this->prenom;
}
public function setPrenom(string $prenom): self
{
$this->prenom = $prenom;
return $this;
}
public function getSociete(): ?string
{
return $this->societe;
}
public function setSociete(string $societe): self
{
$this->societe = $societe;
return $this;
}
public function getPhone(): ?string
{
return $this->phone;
}
public function setPhone(string $phone): self
{
$this->phone = $phone;
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(string $email): self
{
$this->email = $email;
return $this;
}
public function getPhoto(): ?string
{
return $this->photo;
}
public function setPhoto(string $photo): self
{
$this->photo = $photo;
return $this;
}
public function getAdresse(): ?string
{
return $this->adresse;
}
public function setAdresse(string $adresse): self
{
$this->adresse = $adresse;
return $this;
}
public function getStatus(): ?string
{
return $this->status;
}
public function setStatus(string $status): self
{
$this->status = $status;
return $this;
}
/**
* @return Collection<int, OperationStandard>
*/
public function getOperationStandards(): Collection
{
return $this->operationStandards;
}
public function addOperationStandard(OperationStandard $operationStandard): self
{
if (!$this->operationStandards->contains($operationStandard)) {
$this->operationStandards[] = $operationStandard;
$operationStandard->addOperationstandard($this);
}
return $this;
}
public function removeOperationStandard(OperationStandard $operationStandard): self
{
if ($this->operationStandards->removeElement($operationStandard)) {
$operationStandard->removeOperationstandard($this);
}
return $this;
}
/**
* @return Collection<int, Deal>
*/
public function getDeals(): Collection
{
return $this->deals;
}
public function addDeal(Deal $deal): self
{
if (!$this->deals->contains($deal)) {
$this->deals[] = $deal;
$deal->setInstallateur($this);
}
return $this;
}
public function removeDeal(Deal $deal): self
{
if ($this->deals->removeElement($deal)) {
// set the owning side to null (unless already changed)
if ($deal->getInstallateur() === $this) {
$deal->setInstallateur(null);
}
}
return $this;
}
/**
* @return Collection<int, ContratSigne>
*/
public function getContratSignes(): Collection
{
return $this->contratSignes;
}
public function addContratSigne(ContratSigne $contratSigne): self
{
if (!$this->contratSignes->contains($contratSigne)) {
$this->contratSignes[] = $contratSigne;
$contratSigne->setInstallateur($this);
}
return $this;
}
public function removeContratSigne(ContratSigne $contratSigne): self
{
if ($this->contratSignes->removeElement($contratSigne)) {
// set the owning side to null (unless already changed)
if ($contratSigne->getInstallateur() === $this) {
$contratSigne->setInstallateur(null);
}
}
return $this;
}
/**
* @return Collection<int, ChampsInstallateur>
*/
public function getChampsinstallateur(): Collection
{
return $this->champsinstallateur;
}
public function addChampsinstallateur(ChampsInstallateur $champsinstallateur): self
{
if (!$this->champsinstallateur->contains($champsinstallateur)) {
$this->champsinstallateur[] = $champsinstallateur;
$champsinstallateur->setInstallateur($this);
}
return $this;
}
public function removeChampsinstallateur(ChampsInstallateur $champsinstallateur): self
{
if ($this->champsinstallateur->removeElement($champsinstallateur)) {
// set the owning side to null (unless already changed)
if ($champsinstallateur->getInstallateur() === $this) {
$champsinstallateur->setInstallateur(null);
}
}
return $this;
}
public function getCommentaire(): ?string
{
return $this->commentaire;
}
public function setCommentaire(?string $commentaire): self
{
$this->commentaire = $commentaire;
return $this;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
/**
* @return Collection<int, Soustraitant>
*/
public function getSoustraitants(): Collection
{
return $this->soustraitants;
}
public function addSoustraitant(Soustraitant $soustraitant): self
{
if (!$this->soustraitants->contains($soustraitant)) {
$this->soustraitants[] = $soustraitant;
$soustraitant->setInstallateur($this);
}
return $this;
}
public function removeSoustraitant(Soustraitant $soustraitant): self
{
if ($this->soustraitants->removeElement($soustraitant)) {
// set the owning side to null (unless already changed)
if ($soustraitant->getInstallateur() === $this) {
$soustraitant->setInstallateur(null);
}
}
return $this;
}
/**
* @return Collection<int, ActiviteDeal>
*/
public function getActiviteDeals(): Collection
{
return $this->activiteDeals;
}
public function addActiviteDeal(ActiviteDeal $activiteDeal): self
{
if (!$this->activiteDeals->contains($activiteDeal)) {
$this->activiteDeals[] = $activiteDeal;
$activiteDeal->setInstallateur($this);
}
return $this;
}
public function removeActiviteDeal(ActiviteDeal $activiteDeal): self
{
if ($this->activiteDeals->removeElement($activiteDeal)) {
// set the owning side to null (unless already changed)
if ($activiteDeal->getInstallateur() === $this) {
$activiteDeal->setInstallateur(null);
}
}
return $this;
}
/**
* @return Collection<int, ActiviteDossier>
*/
public function getActiviteDossiers(): Collection
{
return $this->activiteDossiers;
}
public function addActiviteDossier(ActiviteDossier $activiteDossier): self
{
if (!$this->activiteDossiers->contains($activiteDossier)) {
$this->activiteDossiers[] = $activiteDossier;
$activiteDossier->setInstallateur($this);
}
return $this;
}
public function removeActiviteDossier(ActiviteDossier $activiteDossier): self
{
if ($this->activiteDossiers->removeElement($activiteDossier)) {
// set the owning side to null (unless already changed)
if ($activiteDossier->getInstallateur() === $this) {
$activiteDossier->setInstallateur(null);
}
}
return $this;
}
/**
* @return Collection<int, CommentaireInstalleur>
*/
public function getCommentaireInstalleurs(): Collection
{
return $this->commentaireInstalleurs;
}
public function addCommentaireInstalleur(CommentaireInstalleur $commentaireInstalleur): self
{
if (!$this->commentaireInstalleurs->contains($commentaireInstalleur)) {
$this->commentaireInstalleurs[] = $commentaireInstalleur;
$commentaireInstalleur->setInstalleur($this);
}
return $this;
}
public function removeCommentaireInstalleur(CommentaireInstalleur $commentaireInstalleur): self
{
if ($this->commentaireInstalleurs->removeElement($commentaireInstalleur)) {
// set the owning side to null (unless already changed)
if ($commentaireInstalleur->getInstalleur() === $this) {
$commentaireInstalleur->setInstalleur(null);
}
}
return $this;
}
public function getArchive(): ?string
{
return $this->archive;
}
public function setArchive(?string $archive): self
{
$this->archive = $archive;
return $this;
}
public function getEquipe(): ?Equipe
{
return $this->equipe;
}
public function setEquipe(?Equipe $equipe): self
{
$this->equipe = $equipe;
return $this;
}
/**
* @return Collection<int, ContactInstallateur>
*/
public function getContactInstallateurs(): Collection
{
return $this->contactInstallateurs;
}
public function addContactInstallateur(ContactInstallateur $contactInstallateur): self
{
if (!$this->contactInstallateurs->contains($contactInstallateur)) {
$this->contactInstallateurs[] = $contactInstallateur;
$contactInstallateur->setInstallateur($this);
}
return $this;
}
public function removeContactInstallateur(ContactInstallateur $contactInstallateur): self
{
if ($this->contactInstallateurs->removeElement($contactInstallateur)) {
// set the owning side to null (unless already changed)
if ($contactInstallateur->getInstallateur() === $this) {
$contactInstallateur->setInstallateur(null);
}
}
return $this;
}
/**
* @return Collection<int, Docfacture>
*/
public function getDocfactures(): Collection
{
return $this->docfactures;
}
public function addDocfacture(Docfacture $docfacture): self
{
if (!$this->docfactures->contains($docfacture)) {
$this->docfactures[] = $docfacture;
$docfacture->setInstallateur($this);
}
return $this;
}
public function removeDocfacture(Docfacture $docfacture): self
{
if ($this->docfactures->removeElement($docfacture)) {
// set the owning side to null (unless already changed)
if ($docfacture->getInstallateur() === $this) {
$docfacture->setInstallateur(null);
}
}
return $this;
}
}