<?php
namespace App\Entity;
use App\Repository\EquipeRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=EquipeRepository::class)
*/
class Equipe
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $prenom;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $nom;
/**
* @ORM\Column(type="string", length=255)
*/
private $email;
/**
* @ORM\Column(type="string", length=255)
*/
private $role;
/**
* @ORM\Column(type="json")
*/
private $permissions = [];
/**
* @ORM\Column(type="string", length=255,nullable=true)
*/
private $phone;
/**
* @ORM\Column(type="string", length=255,nullable=true)
*/
private $photo;
/**
* @ORM\OneToOne(targetEntity=User::class, inversedBy="equipe", cascade={"persist", "remove"})
*/
private $user;
/**
* @ORM\OneToMany(targetEntity=ActiviteDeal::class, mappedBy="equipe")
*/
private $activiteDeals;
/**
* @ORM\OneToMany(targetEntity=ActiviteDossier::class, mappedBy="equipe")
*/
private $activiteDossiers;
/**
* @ORM\OneToMany(targetEntity=CommentairesControlle::class, mappedBy="controleur")
*/
private $commentairesControlles;
/**
* @ORM\OneToMany(targetEntity=DepotDossier::class, mappedBy="controler1")
*/
private $dossiercontroler1;
/**
* @ORM\OneToMany(targetEntity=DepotDossier::class, mappedBy="controler2")
*/
private $dossiercontroler2;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $signature;
/**
* @ORM\OneToMany(targetEntity=Appelqualite::class, mappedBy="equipe")
*/
private $appelqualites;
/**
* @ORM\OneToMany(targetEntity=Installateur::class, mappedBy="equipe")
*/
private $installateurs;
public function __construct()
{
$this->activiteDeals = new ArrayCollection();
$this->activiteDossiers = new ArrayCollection();
$this->commentairesControlles = new ArrayCollection();
$this->dossiercontroler1 = new ArrayCollection();
$this->dossiercontroler2 = new ArrayCollection();
$this->appelqualites = new ArrayCollection();
$this->installateurs = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getPrenom(): ?string
{
return $this->prenom;
}
public function setPrenom(?string $prenom): self
{
$this->prenom = $prenom;
return $this;
}
public function getNom(): ?string
{
return $this->nom;
}
public function setNom(?string $nom): self
{
$this->nom = $nom;
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(string $email): self
{
$this->email = $email;
return $this;
}
public function getRole(): ?string
{
return $this->role;
}
public function setRole(string $role): self
{
$this->role = $role;
return $this;
}
public function getPermissions(): ?array
{
return $this->permissions;
}
public function setPermissions(array $permissions): self
{
$this->permissions = $permissions;
return $this;
}
public function getPhone(): ?string
{
return $this->phone;
}
public function setPhone(string $phone): self
{
$this->phone = $phone;
return $this;
}
public function getPhoto(): ?string
{
return $this->photo;
}
public function setPhoto(string $photo): self
{
$this->photo = $photo;
return $this;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
$this->user = $user;
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->setEquipe($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->getEquipe() === $this) {
$activiteDeal->setEquipe(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->setEquipe($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->getEquipe() === $this) {
$activiteDossier->setEquipe(null);
}
}
return $this;
}
/**
* @return Collection<int, CommentairesControlle>
*/
public function getCommentairesControlles(): Collection
{
return $this->commentairesControlles;
}
public function addCommentairesControlle(CommentairesControlle $commentairesControlle): self
{
if (!$this->commentairesControlles->contains($commentairesControlle)) {
$this->commentairesControlles[] = $commentairesControlle;
$commentairesControlle->setControleur($this);
}
return $this;
}
public function removeCommentairesControlle(CommentairesControlle $commentairesControlle): self
{
if ($this->commentairesControlles->removeElement($commentairesControlle)) {
// set the owning side to null (unless already changed)
if ($commentairesControlle->getControleur() === $this) {
$commentairesControlle->setControleur(null);
}
}
return $this;
}
/**
* @return Collection<int, DepotDossier>
*/
public function getDossiercontroler1(): Collection
{
return $this->dossiercontroler1;
}
public function addDossiercontroler1(DepotDossier $dossiercontroler1): self
{
if (!$this->dossiercontroler1->contains($dossiercontroler1)) {
$this->dossiercontroler1[] = $dossiercontroler1;
$dossiercontroler1->setControler1($this);
}
return $this;
}
public function removeDossiercontroler1(DepotDossier $dossiercontroler1): self
{
if ($this->dossiercontroler1->removeElement($dossiercontroler1)) {
// set the owning side to null (unless already changed)
if ($dossiercontroler1->getControler1() === $this) {
$dossiercontroler1->setControler1(null);
}
}
return $this;
}
/**
* @return Collection<int, DepotDossier>
*/
public function getDossiercontroler2(): Collection
{
return $this->dossiercontroler2;
}
public function addDossiercontroler2(DepotDossier $dossiercontroler2): self
{
if (!$this->dossiercontroler2->contains($dossiercontroler2)) {
$this->dossiercontroler2[] = $dossiercontroler2;
$dossiercontroler2->setControler2($this);
}
return $this;
}
public function removeDossiercontroler2(DepotDossier $dossiercontroler2): self
{
if ($this->dossiercontroler2->removeElement($dossiercontroler2)) {
// set the owning side to null (unless already changed)
if ($dossiercontroler2->getControler2() === $this) {
$dossiercontroler2->setControler2(null);
}
}
return $this;
}
public function getSignature(): ?string
{
return $this->signature;
}
public function setSignature(?string $signature): self
{
$this->signature = $signature;
return $this;
}
/**
* @return Collection<int, Appelqualite>
*/
public function getAppelqualites(): Collection
{
return $this->appelqualites;
}
public function addAppelqualite(Appelqualite $appelqualite): self
{
if (!$this->appelqualites->contains($appelqualite)) {
$this->appelqualites[] = $appelqualite;
$appelqualite->setEquipe($this);
}
return $this;
}
public function removeAppelqualite(Appelqualite $appelqualite): self
{
if ($this->appelqualites->removeElement($appelqualite)) {
// set the owning side to null (unless already changed)
if ($appelqualite->getEquipe() === $this) {
$appelqualite->setEquipe(null);
}
}
return $this;
}
/**
* @return Collection<int, Installateur>
*/
public function getInstallateurs(): Collection
{
return $this->installateurs;
}
public function addInstallateur(Installateur $installateur): self
{
if (!$this->installateurs->contains($installateur)) {
$this->installateurs[] = $installateur;
$installateur->setEquipe($this);
}
return $this;
}
public function removeInstallateur(Installateur $installateur): self
{
if ($this->installateurs->removeElement($installateur)) {
// set the owning side to null (unless already changed)
if ($installateur->getEquipe() === $this) {
$installateur->setEquipe(null);
}
}
return $this;
}
}