<?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="string", length=255)
*/
private $code;
/**
* @ORM\Column(type="string", length=255)
*/
private $name;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $themeCss;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $banner;
/**
* @ORM\Column(type="string", length=255)
*/
private $idOrg;
/**
* @ORM\OneToMany(targetEntity=Projet::class, mappedBy="client")
*/
private $projets;
/**
* @ORM\OneToMany(targetEntity=ClientProduit::class, mappedBy="client")
*/
private $clientProduits;
/**
* @ORM\OneToMany(targetEntity=Subscriber::class, mappedBy="client")
*/
private $subscribers;
/**
* @ORM\OneToMany(targetEntity=Groupe::class, mappedBy="client")
*/
private $groupes;
public function __construct()
{
$this->projets = new ArrayCollection();
$this->clientProduits = new ArrayCollection();
$this->subscribers = new ArrayCollection();
$this->groupes = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getCode(): ?string
{
return $this->code;
}
public function setCode(string $code): self
{
$this->code = $code;
return $this;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getThemeCss(): ?string
{
return $this->themeCss;
}
public function setThemeCss(?string $themeCss): self
{
$this->themeCss = $themeCss;
return $this;
}
public function getBanner(): ?string
{
return $this->banner;
}
public function setBanner(?string $banner): self
{
$this->banner = $banner;
return $this;
}
public function getIdOrg(): ?string
{
return $this->idOrg;
}
public function setIdOrg(string $idOrg): self
{
$this->idOrg = $idOrg;
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->removeElement($projet)) {
// set the owning side to null (unless already changed)
if ($projet->getClient() === $this) {
$projet->setClient(null);
}
}
return $this;
}
/**
* @return Collection|ClientProduit[]
*/
public function getClientProduits(): Collection
{
return $this->clientProduits;
}
public function addClientProduit(ClientProduit $clientProduit): self
{
if (!$this->clientProduits->contains($clientProduit)) {
$this->clientProduits[] = $clientProduit;
$clientProduit->setClient($this);
}
return $this;
}
public function removeClientProduit(ClientProduit $clientProduit): self
{
if ($this->clientProduits->removeElement($clientProduit)) {
// set the owning side to null (unless already changed)
if ($clientProduit->getClient() === $this) {
$clientProduit->setClient(null);
}
}
return $this;
}
/**
* @return Collection|Subscriber[]
*/
public function getSubscribers(): Collection
{
return $this->subscribers;
}
public function addSubscriber(Subscriber $subscriber): self
{
if (!$this->subscribers->contains($subscriber)) {
$this->subscribers[] = $subscriber;
$subscriber->setClient($this);
}
return $this;
}
public function removeSubscriber(Subscriber $subscriber): self
{
if ($this->subscribers->removeElement($subscriber)) {
// set the owning side to null (unless already changed)
if ($subscriber->getClient() === $this) {
$subscriber->setClient(null);
}
}
return $this;
}
/**
* @return Collection|Groupe[]
*/
public function getGroupes(): Collection
{
return $this->groupes;
}
public function addGroupe(Groupe $groupe): self
{
if (!$this->groupes->contains($groupe)) {
$this->groupes[] = $groupe;
$groupe->setClient($this);
}
return $this;
}
public function removeGroupe(Groupe $groupe): self
{
if ($this->groupes->removeElement($groupe)) {
// set the owning side to null (unless already changed)
if ($groupe->getClient() === $this) {
$groupe->setClient(null);
}
}
return $this;
}
}