<?php
namespace App\Entity;
use App\Repository\ClientRepository;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
/**
* @ORM\Entity(repositoryClass=ClientRepository::class)
*/
class Client
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $raisonSociale;
/*
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $Siret;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $idClientMBEHub;
/**
* @ORM\Column(type="string", length=255)
*/
private $nomContact;
/**
* @ORM\Column(type="string", length=255)
*/
private $prenomContact;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $emailContact;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $telephoneContact;
/**
* @ORM\Column(type="boolean", options={"default":"0"})
*/
private $assuranceDefaut;
/**
* @ORM\Column(type="boolean", options={"default":"0"})
*/
private $emballageDefaut;
/**
* @ORM\Column(type="string", length=255)
*/
private $codePostal;
/**
* @ORM\Column(type="string", length=255)
*/
private $ville;
/**
* @ORM\Column(type="string", length=255)
*/
private $adresse;
/**
* @ORM\OneToMany(targetEntity=Commande::class, mappedBy="client", orphanRemoval=true)
*/
private $commandes;
/**
* @ORM\OneToOne(targetEntity=User::class, mappedBy="client", cascade={"persist", "remove"})
*/
private $user;
/**
* @ORM\Column(type="string", length=255)
*/
private $eori;
/**
* @ORM\Column(type="boolean", nullable=true, options={"default" : 0})
*/
private $fastPickup;
public function __construct()
{
$this->commandes = new ArrayCollection();
}
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 getIdClientMBEHub(): ?string
{
return $this->idClientMBEHub;
}
public function setIdClientMBEHub(?string $idClientMBEHub): self
{
$this->idClientMBEHub = $idClientMBEHub;
return $this;
}
public function getNomContact(): ?string
{
return $this->nomContact;
}
public function setNomContact(string $nomContact): self
{
$this->nomContact = $nomContact;
return $this;
}
public function getPrenomContact(): ?string
{
return $this->prenomContact;
}
public function setPrenomContact(?string $prenomContact): self
{
$this->prenomContact = $prenomContact;
return $this;
}
public function getEmailContact(): ?string
{
return $this->emailContact;
}
public function setEmailContact(string $emailContact): self
{
$this->emailContact = $emailContact;
return $this;
}
public function getTelephoneContact(): ?string
{
return $this->telephoneContact;
}
public function setTelephoneContact(?string $telephoneContact): self
{
$this->telephoneContact = $telephoneContact;
return $this;
}
public function isAssuranceDefaut(): ?bool
{
return $this->assuranceDefaut;
}
public function setAssuranceDefaut(bool $assuranceDefaut): self
{
$this->assuranceDefaut = $assuranceDefaut;
return $this;
}
public function isEmballageDefaut(): ?bool
{
return $this->emballageDefaut;
}
public function setEmballageDefaut(bool $emballageDefaut): self
{
$this->emballageDefaut = $emballageDefaut;
return $this;
}
public function getCodePostal(): ?string
{
return $this->codePostal;
}
public function setCodePostal(string $codePostal): self
{
$this->codePostal = $codePostal;
return $this;
}
public function getVille(): ?string
{
return $this->ville;
}
public function setVille(string $ville): self
{
$this->ville = $ville;
return $this;
}
public function getAdresse(): ?string
{
return $this->adresse;
}
public function setAdresse(string $adresse): self
{
$this->adresse = $adresse;
return $this;
}
/**
* @return Collection<int, Commande>
*/
public function getCommandes(): Collection
{
return $this->commandes;
}
public function addCommande(Commande $commande): self
{
if (!$this->commandes->contains($commande)) {
$this->commandes[] = $commande;
$commande->setClient($this);
}
return $this;
}
public function removeCommande(Commande $commande): self
{
if ($this->commandes->removeElement($commande)) {
// set the owning side to null (unless already changed)
if ($commande->getClient() === $this) {
$commande->setClient(null);
}
}
return $this;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(User $user): self
{
// set the owning side of the relation if necessary
if ($user->getClient() !== $this) {
$user->setClient($this);
}
$this->user = $user;
return $this;
}
public function getEori(): ?string
{
return $this->eori;
}
public function setEori(string $eori): self
{
$this->eori = $eori;
return $this;
}
public function isFastPickup(): ?bool
{
return $this->fastPickup;
}
public function setFastPickup(?bool $fastPickup): self
{
$this->fastPickup = $fastPickup;
return $this;
}
}