<?php
namespace App\Entity;
use App\Repository\ClientRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=ClientRepository::class)
*/
class Client
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $idOrg;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $code;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $nom;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $status;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $nombreProjet;
/**
* @ORM\Column(name="zendeskName",type="string", length=255, nullable=true)
*/
private $zendeskName;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $pathImage;
/**
* @ORM\Column(name="dateMaj",type="string", length=255, nullable=true)
*/
private $dateMaj;
/**
* @ORM\OneToOne(targetEntity=Statistique::class, cascade={"persist", "remove"})
* @ORM\JoinColumn(name="id_stat")
*/
private $statistique;
/**
* @ORM\OneToOne(targetEntity=CustomStat::class, cascade={"persist", "remove"})
* @ORM\JoinColumn(name="id_custom_stat")
*/
private $customStat;
/**
* @ORM\OneToMany(targetEntity=Mooc::class, mappedBy="client")
*/
private $moocs;
/**
* @ORM\OneToMany(targetEntity=Projet::class, mappedBy="client")
*/
private $projets;
/**
* @ORM\ManyToOne(targetEntity=Utilisateur::class, inversedBy="clients")
* @ORM\JoinColumn(name="id_user")
*/
private $idUser;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $smsLabel;
public function __construct()
{
$this->moocs = new ArrayCollection();
$this->projets = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getIdOrg(): ?int
{
return $this->idOrg;
}
public function setIdOrg(?int $idOrg): self
{
$this->idOrg = $idOrg;
return $this;
}
public function getCode(): ?string
{
return $this->code;
}
public function setCode(?string $code): self
{
$this->code = $code;
return $this;
}
public function getNom(): ?string
{
return $this->nom;
}
public function setNom(?string $nom): self
{
$this->nom = $nom;
return $this;
}
public function getStatus(): ?int
{
return $this->status;
}
public function setStatus(?int $status): self
{
$this->status = $status;
return $this;
}
public function getNombreProjet(): ?int
{
return $this->nombreProjet;
}
public function setNombreProjet(?int $nombreProjet): self
{
$this->nombreProjet = $nombreProjet;
return $this;
}
public function getZendeskName(): ?string
{
return $this->zendeskName;
}
public function setZendeskName(?string $zendeskName): self
{
$this->zendeskName = $zendeskName;
return $this;
}
public function getPathImage(): ?string
{
return $this->pathImage;
}
public function setPathImage(?string $pathImage): self
{
$this->pathImage = $pathImage;
return $this;
}
public function getDateMaj(): ?string
{
return $this->dateMaj;
}
public function setDateMaj(?string $dateMaj): self
{
$this->dateMaj = $dateMaj;
return $this;
}
public function getStatistique(): ?Statistique
{
return $this->statistique;
}
public function setStatistique(?Statistique $statistique): self
{
$this->statistique = $statistique;
return $this;
}
public function getCustomStat(): ?CustomStat
{
return $this->customStat;
}
public function setCustomStat(?CustomStat $customStat): self
{
$this->customStat = $customStat;
return $this;
}
/**
* @return Collection|Mooc[]
*/
public function getMoocs(): Collection
{
return $this->moocs;
}
public function addMooc(Mooc $mooc): self
{
if (!$this->moocs->contains($mooc)) {
$this->moocs[] = $mooc;
$mooc->setClient($this);
}
return $this;
}
public function removeMooc(Mooc $mooc): self
{
if ($this->moocs->contains($mooc)) {
$this->moocs->removeElement($mooc);
// set the owning side to null (unless already changed)
if ($mooc->getClient() === $this) {
$mooc->setClient(null);
}
}
return $this;
}
/**
* @return Collection|Projet[]
*/
public function getProjets(): Collection
{
return $this->projets;
}
public function addProjet(Projet $projet): self
{
if (!$this->projets->contains($projet)) {
$this->projets[] = $projet;
$projet->setClient($this);
}
return $this;
}
public function removeProjet(Projet $projet): self
{
if ($this->projets->contains($projet)) {
$this->projets->removeElement($projet);
// set the owning side to null (unless already changed)
if ($projet->getClient() === $this) {
$projet->setClient(null);
}
}
return $this;
}
public function getIdUser(): ?Utilisateur
{
return $this->idUser;
}
public function setIdUser(?Utilisateur $idUser): self
{
$this->idUser = $idUser;
return $this;
}
public function getSmsLabel(): ?string
{
return $this->smsLabel;
}
public function setSmsLabel(?string $smsLabel): self
{
$this->smsLabel = $smsLabel;
return $this;
}
}