<?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, nullable=true)
*/
private $raisonsociale;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $siret;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $siteweb;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $telephone;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $tva;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $civilite;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $nom;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $prenom;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $telephonecontact;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $mail;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $adresse;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $complementadresse;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $ville;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $cp;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $pays;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $creeespaceclient;
/**
* @ORM\OneToMany(targetEntity=Devis::class, mappedBy="client")
*/
private $devisclient;
/**
* @ORM\OneToMany(targetEntity=Commentaire::class, mappedBy="client")
*/
private $commentaires;
/**
* @ORM\ManyToOne(targetEntity=User::class, inversedBy="clients")
*/
private $user;
/**
* @ORM\OneToMany(targetEntity=RetourClient::class, mappedBy="client")
*/
private $retoursClient;
public function __construct()
{
$this->devisclient = new ArrayCollection();
$this->commentaires = new ArrayCollection();
$this->retoursClient = new ArrayCollection();
}
public function __toString()
{
if(is_null( $this->nom)) {
return 'NULL';
}
return $this->nom;
}
public function getId(): ?int
{
return $this->id;
}
public function getRaisonsociale(): ?string
{
return $this->raisonsociale;
}
public function setRaisonsociale(?string $raisonsociale): self
{
$this->raisonsociale = $raisonsociale;
return $this;
}
public function getSiret(): ?string
{
return $this->siret;
}
public function setSiret(?string $siret): self
{
$this->siret = $siret;
return $this;
}
public function getSiteweb(): ?string
{
return $this->siteweb;
}
public function setSiteweb(?string $siteweb): self
{
$this->siteweb = $siteweb;
return $this;
}
public function getTelephone(): ?string
{
return $this->telephone;
}
public function setTelephone(?string $telephone): self
{
$this->telephone = $telephone;
return $this;
}
public function getTva(): ?string
{
return $this->tva;
}
public function setTva(?string $tva): self
{
$this->tva = $tva;
return $this;
}
public function getCivilite(): ?string
{
return $this->civilite;
}
public function setCivilite(?string $civilite): self
{
$this->civilite = $civilite;
return $this;
}
public function getNom(): ?string
{
return $this->nom;
}
public function setNom(?string $nom): self
{
$this->nom = $nom;
return $this;
}
public function getPrenom(): ?string
{
return $this->prenom;
}
public function setPrenom(?string $prenom): self
{
$this->prenom = $prenom;
return $this;
}
public function getTelephonecontact(): ?string
{
return $this->telephonecontact;
}
public function setTelephonecontact(?string $telephonecontact): self
{
$this->telephonecontact = $telephonecontact;
return $this;
}
public function getMail(): ?string
{
return $this->mail;
}
public function setMail(?string $mail): self
{
$this->mail = $mail;
return $this;
}
public function getAdresse(): ?string
{
return $this->adresse;
}
public function setAdresse(?string $adresse): self
{
$this->adresse = $adresse;
return $this;
}
public function getComplementadresse(): ?string
{
return $this->complementadresse;
}
public function setComplementadresse(?string $complementadresse): self
{
$this->complementadresse = $complementadresse;
return $this;
}
public function getVille(): ?string
{
return $this->ville;
}
public function setVille(?string $ville): self
{
$this->ville = $ville;
return $this;
}
public function getCp(): ?string
{
return $this->cp;
}
public function setCp(?string $cp): self
{
$this->cp = $cp;
return $this;
}
public function getPays(): ?string
{
return $this->pays;
}
public function setPays(?string $pays): self
{
$this->pays = $pays;
return $this;
}
public function getCreeespaceclient(): ?string
{
return $this->creeespaceclient;
}
public function setCreeespaceclient(?string $creeespaceclient): self
{
$this->creeespaceclient = $creeespaceclient;
return $this;
}
/**
* @return Collection|Devis[]
*/
public function getDevisclient(): Collection
{
return $this->devisclient;
}
public function addDevisclient(Devis $devisclient): self
{
if (!$this->devisclient->contains($devisclient)) {
$this->devisclient[] = $devisclient;
$devisclient->setClient($this);
}
return $this;
}
public function removeDevisclient(Devis $devisclient): self
{
if ($this->devisclient->removeElement($devisclient)) {
// set the owning side to null (unless already changed)
if ($devisclient->getClient() === $this) {
$devisclient->setClient(null);
}
}
return $this;
}
/**
* @return Collection|Commentaire[]
*/
public function getCommentaires(): Collection
{
return $this->commentaires;
}
public function addCommentaire(Commentaire $commentaire): self
{
if (!$this->commentaires->contains($commentaire)) {
$this->commentaires[] = $commentaire;
$commentaire->setClient($this);
}
return $this;
}
public function removeCommentaire(Commentaire $commentaire): self
{
if ($this->commentaires->removeElement($commentaire)) {
// set the owning side to null (unless already changed)
if ($commentaire->getClient() === $this) {
$commentaire->setClient(null);
}
}
return $this;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
/**
* @return Collection<int, RetourClient>
*/
public function getRetoursClient(): Collection
{
return $this->retoursClient;
}
public function addRetoursClient(RetourClient $retoursClient): self
{
if (!$this->retoursClient->contains($retoursClient)) {
$this->retoursClient[] = $retoursClient;
$retoursClient->setClient($this);
}
return $this;
}
public function removeRetoursClient(RetourClient $retoursClient): self
{
if ($this->retoursClient->removeElement($retoursClient)) {
// set the owning side to null (unless already changed)
if ($retoursClient->getClient() === $this) {
$retoursClient->setClient(null);
}
}
return $this;
}
}