src/Entity/Equipe.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\EquipeRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=EquipeRepository::class)
  9.  */
  10. class Equipe
  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, nullable=true)
  20.      */
  21.     private $prenom;
  22.     /**
  23.      * @ORM\Column(type="string", length=255, nullable=true)
  24.      */
  25.     private $nom;
  26.     /**
  27.      * @ORM\Column(type="string", length=255)
  28.      */
  29.     private $email;
  30.     /**
  31.      * @ORM\Column(type="string", length=255)
  32.      */
  33.     private $role;
  34.      /**
  35.      * @ORM\Column(type="json")
  36.      */
  37.     private $permissions = [];
  38.     /**
  39.      * @ORM\Column(type="string", length=255,nullable=true)
  40.      */
  41.     private $phone;
  42.     /**
  43.      * @ORM\Column(type="string", length=255,nullable=true)
  44.      */
  45.     private $photo;
  46.     /**
  47.      * @ORM\OneToOne(targetEntity=User::class, inversedBy="equipe", cascade={"persist", "remove"})
  48.      */
  49.     private $user;
  50.     /**
  51.      * @ORM\OneToMany(targetEntity=ActiviteDeal::class, mappedBy="equipe")
  52.      */
  53.     private $activiteDeals;
  54.     /**
  55.      * @ORM\OneToMany(targetEntity=ActiviteDossier::class, mappedBy="equipe")
  56.      */
  57.     private $activiteDossiers;
  58.     /**
  59.      * @ORM\OneToMany(targetEntity=CommentairesControlle::class, mappedBy="controleur")
  60.      */
  61.     private $commentairesControlles;
  62.     /**
  63.      * @ORM\OneToMany(targetEntity=DepotDossier::class, mappedBy="controler1")
  64.      */
  65.     private $dossiercontroler1;
  66.     /**
  67.      * @ORM\OneToMany(targetEntity=DepotDossier::class, mappedBy="controler2")
  68.      */
  69.     private $dossiercontroler2;
  70.     /**
  71.      * @ORM\Column(type="string", length=255, nullable=true)
  72.      */
  73.     private $signature;
  74.     /**
  75.      * @ORM\OneToMany(targetEntity=Appelqualite::class, mappedBy="equipe")
  76.      */
  77.     private $appelqualites;
  78.     /**
  79.      * @ORM\OneToMany(targetEntity=Installateur::class, mappedBy="equipe")
  80.      */
  81.     private $installateurs;
  82.     public function __construct()
  83.     {
  84.         $this->activiteDeals = new ArrayCollection();
  85.         $this->activiteDossiers = new ArrayCollection();
  86.         $this->commentairesControlles = new ArrayCollection();
  87.         $this->dossiercontroler1 = new ArrayCollection();
  88.         $this->dossiercontroler2 = new ArrayCollection();
  89.         $this->appelqualites = new ArrayCollection();
  90.         $this->installateurs = new ArrayCollection();
  91.     }
  92.     public function getId(): ?int
  93.     {
  94.         return $this->id;
  95.     }
  96.     public function getPrenom(): ?string
  97.     {
  98.         return $this->prenom;
  99.     }
  100.     public function setPrenom(?string $prenom): self
  101.     {
  102.         $this->prenom $prenom;
  103.         return $this;
  104.     }
  105.     public function getNom(): ?string
  106.     {
  107.         return $this->nom;
  108.     }
  109.     public function setNom(?string $nom): self
  110.     {
  111.         $this->nom $nom;
  112.         return $this;
  113.     }
  114.     public function getEmail(): ?string
  115.     {
  116.         return $this->email;
  117.     }
  118.     public function setEmail(string $email): self
  119.     {
  120.         $this->email $email;
  121.         return $this;
  122.     }
  123.     public function getRole(): ?string
  124.     {
  125.         return $this->role;
  126.     }
  127.     public function setRole(string $role): self
  128.     {
  129.         $this->role $role;
  130.         return $this;
  131.     }
  132.     public function getPermissions(): ?array
  133.     {
  134.         return $this->permissions;
  135.     }
  136.     public function setPermissions(array $permissions): self
  137.     {
  138.         $this->permissions $permissions;
  139.         return $this;
  140.     }
  141.     public function getPhone(): ?string
  142.     {
  143.         return $this->phone;
  144.     }
  145.     public function setPhone(string $phone): self
  146.     {
  147.         $this->phone $phone;
  148.         return $this;
  149.     }
  150.     public function getPhoto(): ?string
  151.     {
  152.         return $this->photo;
  153.     }
  154.     public function setPhoto(string $photo): self
  155.     {
  156.         $this->photo $photo;
  157.         return $this;
  158.     }
  159.     public function getUser(): ?User
  160.     {
  161.         return $this->user;
  162.     }
  163.     public function setUser(?User $user): self
  164.     {
  165.         $this->user $user;
  166.         return $this;
  167.     }
  168.     /**
  169.      * @return Collection<int, ActiviteDeal>
  170.      */
  171.     public function getActiviteDeals(): Collection
  172.     {
  173.         return $this->activiteDeals;
  174.     }
  175.     public function addActiviteDeal(ActiviteDeal $activiteDeal): self
  176.     {
  177.         if (!$this->activiteDeals->contains($activiteDeal)) {
  178.             $this->activiteDeals[] = $activiteDeal;
  179.             $activiteDeal->setEquipe($this);
  180.         }
  181.         return $this;
  182.     }
  183.     public function removeActiviteDeal(ActiviteDeal $activiteDeal): self
  184.     {
  185.         if ($this->activiteDeals->removeElement($activiteDeal)) {
  186.             // set the owning side to null (unless already changed)
  187.             if ($activiteDeal->getEquipe() === $this) {
  188.                 $activiteDeal->setEquipe(null);
  189.             }
  190.         }
  191.         return $this;
  192.     }
  193.     /**
  194.      * @return Collection<int, ActiviteDossier>
  195.      */
  196.     public function getActiviteDossiers(): Collection
  197.     {
  198.         return $this->activiteDossiers;
  199.     }
  200.     public function addActiviteDossier(ActiviteDossier $activiteDossier): self
  201.     {
  202.         if (!$this->activiteDossiers->contains($activiteDossier)) {
  203.             $this->activiteDossiers[] = $activiteDossier;
  204.             $activiteDossier->setEquipe($this);
  205.         }
  206.         return $this;
  207.     }
  208.     public function removeActiviteDossier(ActiviteDossier $activiteDossier): self
  209.     {
  210.         if ($this->activiteDossiers->removeElement($activiteDossier)) {
  211.             // set the owning side to null (unless already changed)
  212.             if ($activiteDossier->getEquipe() === $this) {
  213.                 $activiteDossier->setEquipe(null);
  214.             }
  215.         }
  216.         return $this;
  217.     }
  218.     /**
  219.      * @return Collection<int, CommentairesControlle>
  220.      */
  221.     public function getCommentairesControlles(): Collection
  222.     {
  223.         return $this->commentairesControlles;
  224.     }
  225.     public function addCommentairesControlle(CommentairesControlle $commentairesControlle): self
  226.     {
  227.         if (!$this->commentairesControlles->contains($commentairesControlle)) {
  228.             $this->commentairesControlles[] = $commentairesControlle;
  229.             $commentairesControlle->setControleur($this);
  230.         }
  231.         return $this;
  232.     }
  233.     public function removeCommentairesControlle(CommentairesControlle $commentairesControlle): self
  234.     {
  235.         if ($this->commentairesControlles->removeElement($commentairesControlle)) {
  236.             // set the owning side to null (unless already changed)
  237.             if ($commentairesControlle->getControleur() === $this) {
  238.                 $commentairesControlle->setControleur(null);
  239.             }
  240.         }
  241.         return $this;
  242.     }
  243.     /**
  244.      * @return Collection<int, DepotDossier>
  245.      */
  246.     public function getDossiercontroler1(): Collection
  247.     {
  248.         return $this->dossiercontroler1;
  249.     }
  250.     public function addDossiercontroler1(DepotDossier $dossiercontroler1): self
  251.     {
  252.         if (!$this->dossiercontroler1->contains($dossiercontroler1)) {
  253.             $this->dossiercontroler1[] = $dossiercontroler1;
  254.             $dossiercontroler1->setControler1($this);
  255.         }
  256.         return $this;
  257.     }
  258.     public function removeDossiercontroler1(DepotDossier $dossiercontroler1): self
  259.     {
  260.         if ($this->dossiercontroler1->removeElement($dossiercontroler1)) {
  261.             // set the owning side to null (unless already changed)
  262.             if ($dossiercontroler1->getControler1() === $this) {
  263.                 $dossiercontroler1->setControler1(null);
  264.             }
  265.         }
  266.         return $this;
  267.     }
  268.     /**
  269.      * @return Collection<int, DepotDossier>
  270.      */
  271.     public function getDossiercontroler2(): Collection
  272.     {
  273.         return $this->dossiercontroler2;
  274.     }
  275.     public function addDossiercontroler2(DepotDossier $dossiercontroler2): self
  276.     {
  277.         if (!$this->dossiercontroler2->contains($dossiercontroler2)) {
  278.             $this->dossiercontroler2[] = $dossiercontroler2;
  279.             $dossiercontroler2->setControler2($this);
  280.         }
  281.         return $this;
  282.     }
  283.     public function removeDossiercontroler2(DepotDossier $dossiercontroler2): self
  284.     {
  285.         if ($this->dossiercontroler2->removeElement($dossiercontroler2)) {
  286.             // set the owning side to null (unless already changed)
  287.             if ($dossiercontroler2->getControler2() === $this) {
  288.                 $dossiercontroler2->setControler2(null);
  289.             }
  290.         }
  291.         return $this;
  292.     }
  293.     public function getSignature(): ?string
  294.     {
  295.         return $this->signature;
  296.     }
  297.     public function setSignature(?string $signature): self
  298.     {
  299.         $this->signature $signature;
  300.         return $this;
  301.     }
  302.     /**
  303.      * @return Collection<int, Appelqualite>
  304.      */
  305.     public function getAppelqualites(): Collection
  306.     {
  307.         return $this->appelqualites;
  308.     }
  309.     public function addAppelqualite(Appelqualite $appelqualite): self
  310.     {
  311.         if (!$this->appelqualites->contains($appelqualite)) {
  312.             $this->appelqualites[] = $appelqualite;
  313.             $appelqualite->setEquipe($this);
  314.         }
  315.         return $this;
  316.     }
  317.     public function removeAppelqualite(Appelqualite $appelqualite): self
  318.     {
  319.         if ($this->appelqualites->removeElement($appelqualite)) {
  320.             // set the owning side to null (unless already changed)
  321.             if ($appelqualite->getEquipe() === $this) {
  322.                 $appelqualite->setEquipe(null);
  323.             }
  324.         }
  325.         return $this;
  326.     }
  327.     /**
  328.      * @return Collection<int, Installateur>
  329.      */
  330.     public function getInstallateurs(): Collection
  331.     {
  332.         return $this->installateurs;
  333.     }
  334.     public function addInstallateur(Installateur $installateur): self
  335.     {
  336.         if (!$this->installateurs->contains($installateur)) {
  337.             $this->installateurs[] = $installateur;
  338.             $installateur->setEquipe($this);
  339.         }
  340.         return $this;
  341.     }
  342.     public function removeInstallateur(Installateur $installateur): self
  343.     {
  344.         if ($this->installateurs->removeElement($installateur)) {
  345.             // set the owning side to null (unless already changed)
  346.             if ($installateur->getEquipe() === $this) {
  347.                 $installateur->setEquipe(null);
  348.             }
  349.         }
  350.         return $this;
  351.     }
  352.     
  353. }