src/Entity/Installateur.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\InstallateurRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=InstallateurRepository::class)
  9.  */
  10. class Installateur
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=255)
  20.      */
  21.     private $nom;
  22.     /**
  23.      * @ORM\Column(type="string", length=255)
  24.      */
  25.     private $prenom;
  26.     /**
  27.      * @ORM\Column(type="string", length=255)
  28.      */
  29.     private $societe;
  30.     /**
  31.      * @ORM\Column(type="string", length=255)
  32.      */
  33.     private $phone;
  34.     /**
  35.      * @ORM\Column(type="string", length=255)
  36.      */
  37.     private $email;
  38.     /**
  39.      * @ORM\Column(type="string", length=255,nullable=true)
  40.      */
  41.     private $photo;
  42.     /**
  43.      * @ORM\Column(type="string", length=255,nullable=true)
  44.      */
  45.     private $adresse;
  46.     /**
  47.      * @ORM\Column(type="string", length=255)
  48.      */
  49.     private $status;
  50.     /**
  51.      * @ORM\ManyToMany(targetEntity=OperationStandard::class, mappedBy="operationstandard")
  52.      */
  53.     private $operationStandards;
  54.     /**
  55.      * @ORM\OneToMany(targetEntity=Deal::class, mappedBy="installateur")
  56.      */
  57.     private $deals;
  58.     /**
  59.      * @ORM\OneToMany(targetEntity=ContratSigne::class, mappedBy="installateur")
  60.      */
  61.     private $contratSignes;
  62.     
  63.     /**
  64.      * @ORM\OneToMany(targetEntity=ChampsInstallateur::class, mappedBy="installateur")
  65.      */
  66.     private $champsinstallateur;
  67.     /**
  68.      * @ORM\Column(type="text", nullable=true)
  69.      */
  70.     private $commentaire;
  71.     /**
  72.      * @ORM\OneToOne(targetEntity=User::class, inversedBy="installateur", cascade={"persist", "remove"})
  73.      */
  74.     private $user;
  75.     /**
  76.      * @ORM\OneToMany(targetEntity=Soustraitant::class, mappedBy="installateur")
  77.      */
  78.     private $soustraitants;
  79.     /**
  80.      * @ORM\OneToMany(targetEntity=ActiviteDeal::class, mappedBy="installateur")
  81.      */
  82.     private $activiteDeals;
  83.     /**
  84.      * @ORM\OneToMany(targetEntity=ActiviteDossier::class, mappedBy="installateur")
  85.      */
  86.     private $activiteDossiers;
  87.     /**
  88.      * @ORM\OneToMany(targetEntity=CommentaireInstalleur::class, mappedBy="installeur")
  89.      */
  90.     private $commentaireInstalleurs;
  91.     /**
  92.      * @ORM\Column(type="string", length=255, nullable=true)
  93.      */
  94.     private $archive;
  95.     /**
  96.      * @ORM\ManyToOne(targetEntity=Equipe::class, inversedBy="installateurs")
  97.      */
  98.     private $equipe;
  99.     /**
  100.      * @ORM\OneToMany(targetEntity=ContactInstallateur::class, mappedBy="installateur")
  101.      */
  102.     private $contactInstallateurs;
  103.     /**
  104.      * @ORM\OneToMany(targetEntity=Docfacture::class, mappedBy="installateur")
  105.      */
  106.     private $docfactures;
  107.   
  108.     public function __construct()
  109.     {
  110.         
  111.         $this->operationStandards = new ArrayCollection();
  112.         $this->deals = new ArrayCollection();
  113.         $this->contratSignes = new ArrayCollection();
  114.         $this->champsinstallateur = new ArrayCollection();
  115.         $this->soustraitants = new ArrayCollection();
  116.         $this->activiteDeals = new ArrayCollection();
  117.         $this->activiteDossiers = new ArrayCollection();
  118.         $this->commentaireInstalleurs = new ArrayCollection();
  119.         $this->contactInstallateurs = new ArrayCollection();
  120.         $this->docfactures = new ArrayCollection();
  121.     }
  122.     public function __toString()
  123.     {
  124.         return $this->societe;
  125.     }
  126.     public function getId(): ?int
  127.     {
  128.         return $this->id;
  129.     }
  130.     public function getNom(): ?string
  131.     {
  132.         return $this->nom;
  133.     }
  134.     public function setNom(string $nom): self
  135.     {
  136.         $this->nom $nom;
  137.         return $this;
  138.     }
  139.     public function getPrenom(): ?string
  140.     {
  141.         return $this->prenom;
  142.     }
  143.     public function setPrenom(string $prenom): self
  144.     {
  145.         $this->prenom $prenom;
  146.         return $this;
  147.     }
  148.     public function getSociete(): ?string
  149.     {
  150.         return $this->societe;
  151.     }
  152.     public function setSociete(string $societe): self
  153.     {
  154.         $this->societe $societe;
  155.         return $this;
  156.     }
  157.     public function getPhone(): ?string
  158.     {
  159.         return $this->phone;
  160.     }
  161.     public function setPhone(string $phone): self
  162.     {
  163.         $this->phone $phone;
  164.         return $this;
  165.     }
  166.     public function getEmail(): ?string
  167.     {
  168.         return $this->email;
  169.     }
  170.     public function setEmail(string $email): self
  171.     {
  172.         $this->email $email;
  173.         return $this;
  174.     }
  175.     public function getPhoto(): ?string
  176.     {
  177.         return $this->photo;
  178.     }
  179.     public function setPhoto(string $photo): self
  180.     {
  181.         $this->photo $photo;
  182.         return $this;
  183.     }
  184.     public function getAdresse(): ?string
  185.     {
  186.         return $this->adresse;
  187.     }
  188.     public function setAdresse(string $adresse): self
  189.     {
  190.         $this->adresse $adresse;
  191.         return $this;
  192.     }
  193.     public function getStatus(): ?string
  194.     {
  195.         return $this->status;
  196.     }
  197.     public function setStatus(string $status): self
  198.     {
  199.         $this->status $status;
  200.         return $this;
  201.     }
  202.     /**
  203.      * @return Collection<int, OperationStandard>
  204.      */
  205.     public function getOperationStandards(): Collection
  206.     {
  207.         return $this->operationStandards;
  208.     }
  209.     public function addOperationStandard(OperationStandard $operationStandard): self
  210.     {
  211.         if (!$this->operationStandards->contains($operationStandard)) {
  212.             $this->operationStandards[] = $operationStandard;
  213.             $operationStandard->addOperationstandard($this);
  214.         }
  215.         return $this;
  216.     }
  217.     public function removeOperationStandard(OperationStandard $operationStandard): self
  218.     {
  219.         if ($this->operationStandards->removeElement($operationStandard)) {
  220.             $operationStandard->removeOperationstandard($this);
  221.         }
  222.         return $this;
  223.     }
  224.     /**
  225.      * @return Collection<int, Deal>
  226.      */
  227.     public function getDeals(): Collection
  228.     {
  229.         return $this->deals;
  230.     }
  231.     public function addDeal(Deal $deal): self
  232.     {
  233.         if (!$this->deals->contains($deal)) {
  234.             $this->deals[] = $deal;
  235.             $deal->setInstallateur($this);
  236.         }
  237.         return $this;
  238.     }
  239.     public function removeDeal(Deal $deal): self
  240.     {
  241.         if ($this->deals->removeElement($deal)) {
  242.             // set the owning side to null (unless already changed)
  243.             if ($deal->getInstallateur() === $this) {
  244.                 $deal->setInstallateur(null);
  245.             }
  246.         }
  247.         return $this;
  248.     }
  249.     /**
  250.      * @return Collection<int, ContratSigne>
  251.      */
  252.     public function getContratSignes(): Collection
  253.     {
  254.         return $this->contratSignes;
  255.     }
  256.     public function addContratSigne(ContratSigne $contratSigne): self
  257.     {
  258.         if (!$this->contratSignes->contains($contratSigne)) {
  259.             $this->contratSignes[] = $contratSigne;
  260.             $contratSigne->setInstallateur($this);
  261.         }
  262.         return $this;
  263.     }
  264.     public function removeContratSigne(ContratSigne $contratSigne): self
  265.     {
  266.         if ($this->contratSignes->removeElement($contratSigne)) {
  267.             // set the owning side to null (unless already changed)
  268.             if ($contratSigne->getInstallateur() === $this) {
  269.                 $contratSigne->setInstallateur(null);
  270.             }
  271.         }
  272.         return $this;
  273.     }
  274.     
  275.     /**
  276.      * @return Collection<int, ChampsInstallateur>
  277.      */
  278.     public function getChampsinstallateur(): Collection
  279.     {
  280.         return $this->champsinstallateur;
  281.     }
  282.     public function addChampsinstallateur(ChampsInstallateur $champsinstallateur): self
  283.     {
  284.         if (!$this->champsinstallateur->contains($champsinstallateur)) {
  285.             $this->champsinstallateur[] = $champsinstallateur;
  286.             $champsinstallateur->setInstallateur($this);
  287.         }
  288.         return $this;
  289.     }
  290.     public function removeChampsinstallateur(ChampsInstallateur $champsinstallateur): self
  291.     {
  292.         if ($this->champsinstallateur->removeElement($champsinstallateur)) {
  293.             // set the owning side to null (unless already changed)
  294.             if ($champsinstallateur->getInstallateur() === $this) {
  295.                 $champsinstallateur->setInstallateur(null);
  296.             }
  297.         }
  298.         return $this;
  299.     }
  300.     public function getCommentaire(): ?string
  301.     {
  302.         return $this->commentaire;
  303.     }
  304.     public function setCommentaire(?string $commentaire): self
  305.     {
  306.         $this->commentaire $commentaire;
  307.         return $this;
  308.     }
  309.     public function getUser(): ?User
  310.     {
  311.         return $this->user;
  312.     }
  313.     public function setUser(?User $user): self
  314.     {
  315.         $this->user $user;
  316.         return $this;
  317.     }
  318.     /**
  319.      * @return Collection<int, Soustraitant>
  320.      */
  321.     public function getSoustraitants(): Collection
  322.     {
  323.         return $this->soustraitants;
  324.     }
  325.     public function addSoustraitant(Soustraitant $soustraitant): self
  326.     {
  327.         if (!$this->soustraitants->contains($soustraitant)) {
  328.             $this->soustraitants[] = $soustraitant;
  329.             $soustraitant->setInstallateur($this);
  330.         }
  331.         return $this;
  332.     }
  333.     public function removeSoustraitant(Soustraitant $soustraitant): self
  334.     {
  335.         if ($this->soustraitants->removeElement($soustraitant)) {
  336.             // set the owning side to null (unless already changed)
  337.             if ($soustraitant->getInstallateur() === $this) {
  338.                 $soustraitant->setInstallateur(null);
  339.             }
  340.         }
  341.         return $this;
  342.     }
  343.     /**
  344.      * @return Collection<int, ActiviteDeal>
  345.      */
  346.     public function getActiviteDeals(): Collection
  347.     {
  348.         return $this->activiteDeals;
  349.     }
  350.     public function addActiviteDeal(ActiviteDeal $activiteDeal): self
  351.     {
  352.         if (!$this->activiteDeals->contains($activiteDeal)) {
  353.             $this->activiteDeals[] = $activiteDeal;
  354.             $activiteDeal->setInstallateur($this);
  355.         }
  356.         return $this;
  357.     }
  358.     public function removeActiviteDeal(ActiviteDeal $activiteDeal): self
  359.     {
  360.         if ($this->activiteDeals->removeElement($activiteDeal)) {
  361.             // set the owning side to null (unless already changed)
  362.             if ($activiteDeal->getInstallateur() === $this) {
  363.                 $activiteDeal->setInstallateur(null);
  364.             }
  365.         }
  366.         return $this;
  367.     }
  368.     /**
  369.      * @return Collection<int, ActiviteDossier>
  370.      */
  371.     public function getActiviteDossiers(): Collection
  372.     {
  373.         return $this->activiteDossiers;
  374.     }
  375.     public function addActiviteDossier(ActiviteDossier $activiteDossier): self
  376.     {
  377.         if (!$this->activiteDossiers->contains($activiteDossier)) {
  378.             $this->activiteDossiers[] = $activiteDossier;
  379.             $activiteDossier->setInstallateur($this);
  380.         }
  381.         return $this;
  382.     }
  383.     public function removeActiviteDossier(ActiviteDossier $activiteDossier): self
  384.     {
  385.         if ($this->activiteDossiers->removeElement($activiteDossier)) {
  386.             // set the owning side to null (unless already changed)
  387.             if ($activiteDossier->getInstallateur() === $this) {
  388.                 $activiteDossier->setInstallateur(null);
  389.             }
  390.         }
  391.         return $this;
  392.     }
  393.     /**
  394.      * @return Collection<int, CommentaireInstalleur>
  395.      */
  396.     public function getCommentaireInstalleurs(): Collection
  397.     {
  398.         return $this->commentaireInstalleurs;
  399.     }
  400.     public function addCommentaireInstalleur(CommentaireInstalleur $commentaireInstalleur): self
  401.     {
  402.         if (!$this->commentaireInstalleurs->contains($commentaireInstalleur)) {
  403.             $this->commentaireInstalleurs[] = $commentaireInstalleur;
  404.             $commentaireInstalleur->setInstalleur($this);
  405.         }
  406.         return $this;
  407.     }
  408.     public function removeCommentaireInstalleur(CommentaireInstalleur $commentaireInstalleur): self
  409.     {
  410.         if ($this->commentaireInstalleurs->removeElement($commentaireInstalleur)) {
  411.             // set the owning side to null (unless already changed)
  412.             if ($commentaireInstalleur->getInstalleur() === $this) {
  413.                 $commentaireInstalleur->setInstalleur(null);
  414.             }
  415.         }
  416.         return $this;
  417.     }
  418.     public function getArchive(): ?string
  419.     {
  420.         return $this->archive;
  421.     }
  422.     public function setArchive(?string $archive): self
  423.     {
  424.         $this->archive $archive;
  425.         return $this;
  426.     }
  427.     public function getEquipe(): ?Equipe
  428.     {
  429.         return $this->equipe;
  430.     }
  431.     public function setEquipe(?Equipe $equipe): self
  432.     {
  433.         $this->equipe $equipe;
  434.         return $this;
  435.     }
  436.     /**
  437.      * @return Collection<int, ContactInstallateur>
  438.      */
  439.     public function getContactInstallateurs(): Collection
  440.     {
  441.         return $this->contactInstallateurs;
  442.     }
  443.     public function addContactInstallateur(ContactInstallateur $contactInstallateur): self
  444.     {
  445.         if (!$this->contactInstallateurs->contains($contactInstallateur)) {
  446.             $this->contactInstallateurs[] = $contactInstallateur;
  447.             $contactInstallateur->setInstallateur($this);
  448.         }
  449.         return $this;
  450.     }
  451.     public function removeContactInstallateur(ContactInstallateur $contactInstallateur): self
  452.     {
  453.         if ($this->contactInstallateurs->removeElement($contactInstallateur)) {
  454.             // set the owning side to null (unless already changed)
  455.             if ($contactInstallateur->getInstallateur() === $this) {
  456.                 $contactInstallateur->setInstallateur(null);
  457.             }
  458.         }
  459.         return $this;
  460.     }
  461.     /**
  462.      * @return Collection<int, Docfacture>
  463.      */
  464.     public function getDocfactures(): Collection
  465.     {
  466.         return $this->docfactures;
  467.     }
  468.     public function addDocfacture(Docfacture $docfacture): self
  469.     {
  470.         if (!$this->docfactures->contains($docfacture)) {
  471.             $this->docfactures[] = $docfacture;
  472.             $docfacture->setInstallateur($this);
  473.         }
  474.         return $this;
  475.     }
  476.     public function removeDocfacture(Docfacture $docfacture): self
  477.     {
  478.         if ($this->docfactures->removeElement($docfacture)) {
  479.             // set the owning side to null (unless already changed)
  480.             if ($docfacture->getInstallateur() === $this) {
  481.                 $docfacture->setInstallateur(null);
  482.             }
  483.         }
  484.         return $this;
  485.     }
  486.  
  487. }