<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\HttpFoundation\File\File;
use Symfony\Component\HttpFoundation\File\UploadedFile;
use Symfony\Component\Validator\Constraints as Assert;
use Gedmo\Mapping\Annotation as Gedmo;
/**
*@ORM\Table(name="boutique")
* @ORM\HasLifecycleCallbacks()
* @ORM\Entity(repositoryClass="App\Repository\BoutiqueRepository")
*/
class Boutique
{
/**
* @ORM\ManyToOne(targetEntity="\App\Entity\AppUser")
*/
private $user;
/**
* @ORM\ManyToOne(targetEntity="\App\Entity\CategorieEntreprise")
*/
private $categorieEntreprise;
/**
* @Gedmo\Slug(fields={"nom", "id"})
* @ORM\Column(length=128, unique=true)
*/
private $slug;
/**
* @ORM\OneToOne(targetEntity="\App\Entity\Photo", cascade={"persist", "remove"})
*/
private $logo;
/**
* @ORM\OneToOne(targetEntity="\App\Entity\Photo", cascade={"persist", "remove"})
*/
private $videoPresentation;
/**
* @ORM\OneToOne(targetEntity="\App\Entity\Photo", cascade={"persist", "remove"})
*/
private $coverPhoto;
/**
* @ORM\OneToOne(targetEntity="\App\Entity\Settings", cascade={"persist", "remove"})
*/
private $settings;
/**
* @ORM\ManyToOne(targetEntity="\App\Entity\Pays")
*/
private $pays;
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $adresse;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $telephone;
/**
* @ORM\Column(type="string", length=1024, nullable=true)
*/
private $pushNotificationToken;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $adresse3Words;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $solde;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $latitude;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $longitude;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $estPro;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $estBloque;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $datePremium;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $horaireDOuverture;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $adresseGPSLat;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $adresseGPSLong;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $laDate;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $nombreAvis;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $moyenneAvis;
/**
* @ORM\Column(type="string", length=255)
*/
private $nom;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $moyenneNote;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $nombreDeVisite;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $estCertifie;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $estSupprime;
/**
* @var string
*
* @ORM\Column(type="string", length=25, nullable=true)
*/
private $sigle;
/**
* @var string
*
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $email;
/**
* @var string
*
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $phone;
/**
* @var string
*
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $codePostal;
/**
* @var string
*
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $ville;
/**
* @var string
*
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $siteWeb;
/**
* @var string
*
* @ORM\Column(type="text", nullable=true)
*/
private $description;
/**
* @var string
*
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $fax;
/**
* @var string
*
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $statutJuridique;
/**
* @var string
*
* @ORM\Column(type="float", nullable=true)
*/
private $capital;
/**
* @var string
*
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $matricule;
/**
* @var string
* Pour une entreprise francaise
*
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $siret;
/**
* @var string
* Pour une entreprise francaise
*
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $ape;
/**
* @var string
* Pour une entreprise francaise
*
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $cc;
/**
* @var boolean
*
* @ORM\Column(type="boolean", nullable=true)
*/
private $factureTVA;
/**
* @var string
*
* @ORM\Column(type="text", nullable=true)
*/
private $mentionLegal;
/**
* @var string
*
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $banque;
/**
* @var string
*
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $rib;
/**
* @var string
*
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $iban;
/**
* @var string
*
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $bic;
/**
* @var string|null
*
* @ORM\Column(name="annee", type="string", length=255, nullable=true)
*/
private $annee;
/**
* @var string|null
*
* @ORM\Column(name="mois", type="string", length=255, nullable=true)
*/
private $mois;
/**
* @var string
*
* @ORM\Column(name="qualification", type="string", length=255, nullable=true)
*/
private $qualification;
/**
* @var string
*
* @ORM\Column(name="disponibilite", type="string", length=225, nullable=true)
*/
private $disponibilite;
/**
* @var string
*
* @ORM\Column(name="gamme_de_prix", type="string", length=225, nullable=true)
*/
private $gammeDePrix;
/**
* @var string
*
* @ORM\Column(name="main_d_oeuvre", type="string", length=225, nullable=true)
*/
private $mainDOeuvre;
/**
* @var string
*
* @ORM\Column(name="zone_d_intervention", type="string", length=225, nullable=true)
*/
private $zoneDIntervention;
public function __construct()
{
$this->settings = new Settings;
$p = new Photo;
$p->setUrl('uploads/img/featured/logo.png');
$p->setAlt('Logo');
$this->logo = $p;
$this->moyenneNote = 0;
$this->nombreAvis = 0;
$this->estSupprime = 0;
$this->moyenneAvis = 0;
$this->factureTVA = true;
$this->estBloque = false;
$this->laDate = new \DateTime();
$this->mois = date('mY');
$this->annee = date('Y');
}
public function getId(): ?int
{
return $this->id;
}
/**
* Set nom
*
* @param string $nom
*
* @return Hopital
*/
public function setNom($nom)
{
$this->nom = $nom;
return $this;
}
/**
* Get nom
*
* @return string
*/
public function getNom()
{
return $this->nom;
}
/**
* Set sigle
*
* @param string $sigle
*
* @return Hopital
*/
public function setSigle($sigle)
{
$this->sigle = $sigle;
return $this;
}
/**
* Get sigle
*
* @return string
*/
public function getSigle()
{
return $this->sigle;
}
/**
* Set email
*
* @param string $email
*
* @return Hopital
*/
public function setEmail($email)
{
$this->email = $email;
return $this;
}
/**
* Get email
*
* @return string
*/
public function getEmail()
{
return $this->email;
}
/**
* Set phone
*
* @param string $phone
*
* @return Hopital
*/
public function setPhone($phone)
{
$this->phone = $phone;
return $this;
}
/**
* Get phone
*
* @return string
*/
public function getPhone()
{
return $this->phone;
}
/**
* Set adresse
*
* @param string $adresse
*
* @return Hopital
*/
public function setAdresse($adresse)
{
$this->adresse = $adresse;
return $this;
}
/**
* Get adresse
*
* @return string
*/
public function getAdresse()
{
return $this->adresse;
}
/**
* Set slug
*
* @param string $slug
*
* @return Boutique
*/
public function setSlug($slug)
{
$this->slug = $slug;
return $this;
}
/**
* Get slug
*
* @return string
*/
public function getSlug()
{
return $this->slug;
}
/**
* Set settings
*
* @param \App\Entity\Settings $settings
*
* @return Produit
*/
public function setSettings(\App\Entity\Settings $settings)
{
$this->settings = $settings;
return $this;
}
/**
* Get settings
*
* @return \App\Entity\Settings
*/
public function getSettings()
{
return $this->settings;
}
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 getSiteWeb(): ?string
{
return $this->siteWeb;
}
public function setSiteWeb(?string $siteWeb): self
{
$this->siteWeb = $siteWeb;
return $this;
}
public function getFax(): ?string
{
return $this->fax;
}
public function setFax(?string $fax): self
{
$this->fax = $fax;
return $this;
}
public function getStatutJuridique(): ?string
{
return $this->statutJuridique;
}
public function setStatutJuridique(?string $statutJuridique): self
{
$this->statutJuridique = $statutJuridique;
return $this;
}
public function getCapital(): ?float
{
return $this->capital;
}
public function setCapital(?float $capital): self
{
$this->capital = $capital;
return $this;
}
public function getMatricule(): ?float
{
return $this->matricule;
}
public function setMatricule(?float $matricule): self
{
$this->matricule = $matricule;
return $this;
}
public function getFactureTVA(): ?bool
{
return $this->factureTVA;
}
public function setFactureTVA(?bool $factureTVA): self
{
$this->factureTVA = $factureTVA;
return $this;
}
public function getMentionLegal(): ?string
{
return $this->mentionLegal;
}
public function setMentionLegal(?string $mentionLegal): self
{
$this->mentionLegal = $mentionLegal;
return $this;
}
public function getBanque(): ?string
{
return $this->banque;
}
public function setBanque(?string $banque): self
{
$this->banque = $banque;
return $this;
}
public function getRib(): ?string
{
return $this->rib;
}
public function setRib(?string $rib): self
{
$this->rib = $rib;
return $this;
}
public function getIban(): ?string
{
return $this->iban;
}
public function setIban(?string $iban): self
{
$this->iban = $iban;
return $this;
}
public function getBic(): ?string
{
return $this->bic;
}
public function setBic(?string $bic): self
{
$this->bic = $bic;
return $this;
}
public function getPays(): ?Pays
{
return $this->pays;
}
public function setPays(?Pays $pays): self
{
$this->pays = $pays;
return $this;
}
public function getSiret(): ?string
{
return $this->siret;
}
public function setSiret(?string $siret): self
{
$this->siret = $siret;
return $this;
}
public function getApe(): ?string
{
return $this->ape;
}
public function setApe(?string $ape): self
{
$this->ape = $ape;
return $this;
}
public function getCc(): ?string
{
return $this->cc;
}
public function setCc(?string $cc): self
{
$this->cc = $cc;
return $this;
}
public function getLogo(): ?Photo
{
return $this->logo;
}
public function setLogo(?Photo $logo = null): self
{
$this->logo = $logo;
return $this;
}
public function getCategorieEntreprise(): ?CategorieEntreprise
{
return $this->categorieEntreprise;
}
public function setCategorieEntreprise(?CategorieEntreprise $categorieEntreprise): self
{
$this->categorieEntreprise = $categorieEntreprise;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): self
{
$this->description = $description;
return $this;
}
public function getMoyenneNote(): ?float
{
return $this->moyenneNote;
}
public function setMoyenneNote(?float $moyenneNote): self
{
$this->moyenneNote = $moyenneNote;
return $this;
}
public function getNombreAvis(): ?int
{
return $this->nombreAvis;
}
public function setNombreAvis(?int $nombreAvis): self
{
$this->nombreAvis = $nombreAvis;
return $this;
}
public function getMoyenneAvis(): ?float
{
return $this->moyenneAvis;
}
public function setMoyenneAvis(?float $moyenneAvis): self
{
$this->moyenneAvis = $moyenneAvis;
return $this;
}
public function getLaDate(): ?\DateTimeInterface
{
return $this->laDate;
}
public function setLaDate(?\DateTimeInterface $laDate): self
{
$this->laDate = $laDate;
return $this;
}
public function getAnnee(): ?string
{
return $this->annee;
}
public function setAnnee(?string $annee): self
{
$this->annee = $annee;
return $this;
}
public function getMois(): ?string
{
return $this->mois;
}
public function setMois(?string $mois): self
{
$this->mois = $mois;
return $this;
}
public function getNombreDeVisite(): ?int
{
return $this->nombreDeVisite;
}
public function setNombreDeVisite(?int $nombreDeVisite): self
{
$this->nombreDeVisite = $nombreDeVisite;
return $this;
}
public function getEstCertifie(): ?bool
{
return $this->estCertifie;
}
public function setEstCertifie(?bool $estCertifie): self
{
$this->estCertifie = $estCertifie;
return $this;
}
public function getEstPro(): ?bool
{
return $this->estPro;
}
public function setEstPro(?bool $estPro): self
{
$this->estPro = $estPro;
return $this;
}
public function getVideoPresentation(): ?Photo
{
return $this->videoPresentation;
}
public function setVideoPresentation(?Photo $videoPresentation): self
{
$this->videoPresentation = $videoPresentation;
return $this;
}
public function getCoverPhoto(): ?Photo
{
return $this->coverPhoto;
}
public function setCoverPhoto(?Photo $coverPhoto): self
{
$this->coverPhoto = $coverPhoto;
return $this;
}
public function getHoraireDOuverture(): ?string
{
return $this->horaireDOuverture;
}
public function setHoraireDOuverture(?string $horaireDOuverture): self
{
$this->horaireDOuverture = $horaireDOuverture;
return $this;
}
public function getAdresseGPSLat(): ?float
{
return $this->adresseGPSLat;
}
public function setAdresseGPSLat(?float $adresseGPSLat): self
{
$this->adresseGPSLat = $adresseGPSLat;
return $this;
}
public function getAdresseGPSLong(): ?float
{
return $this->adresseGPSLong;
}
public function setAdresseGPSLong(?float $adresseGPSLong): self
{
$this->adresseGPSLong = $adresseGPSLong;
return $this;
}
public function getAdresse3Words(): ?string
{
return $this->adresse3Words;
}
public function setAdresse3Words(?string $adresse3Words): self
{
$this->adresse3Words = $adresse3Words;
return $this;
}
public function getLatitude(): ?string
{
return $this->latitude;
}
public function setLatitude(?string $latitude): self
{
$this->latitude = $latitude;
return $this;
}
public function getLongitude(): ?string
{
return $this->longitude;
}
public function setLongitude(?string $longitude): self
{
$this->longitude = $longitude;
return $this;
}
public function getDatePremium(): ?\DateTimeInterface
{
return $this->datePremium;
}
public function setDatePremium(?\DateTimeInterface $datePremium): self
{
$this->datePremium = $datePremium;
return $this;
}
public function getUser(): ?AppUser
{
return $this->user;
}
public function setUser(?AppUser $user): self
{
$this->user = $user;
return $this;
}
public function getEstBloque(): ?bool
{
return $this->estBloque;
}
public function setEstBloque(?bool $estBloque): self
{
$this->estBloque = $estBloque;
return $this;
}
/**
@ORM\PrePersist
*/
public function AugmenterNombreElementParent()
{
if($this->getCategorieEntreprise() != null){
$nb = $this->getCategorieEntreprise()->getNombreElement();
$this->getCategorieEntreprise()->setNombreElement($nb+1);
}
}
/**
@ORM\PreRemove
*/
public function diminuerNombreElementParent()
{
if($this->getCategorieEntreprise() != null){
$nb = $this->getCategorieEntreprise()->getNombreElement();
$this->getCategorieEntreprise()->setNombreElement($nb-1);
}
}
public function isEstPro(): ?bool
{
return $this->estPro;
}
public function isEstBloque(): ?bool
{
return $this->estBloque;
}
public function isEstCertifie(): ?bool
{
return $this->estCertifie;
}
public function isFactureTVA(): ?bool
{
return $this->factureTVA;
}
public function getQualification(): ?string
{
return $this->qualification;
}
public function setQualification(?string $qualification): self
{
$this->qualification = $qualification;
return $this;
}
public function getDisponibilite(): ?string
{
return $this->disponibilite;
}
public function setDisponibilite(?string $disponibilite): self
{
$this->disponibilite = $disponibilite;
return $this;
}
public function getGammeDePrix(): ?string
{
return $this->gammeDePrix;
}
public function setGammeDePrix(?string $gammeDePrix): self
{
$this->gammeDePrix = $gammeDePrix;
return $this;
}
public function getMainDOeuvre(): ?string
{
return $this->mainDOeuvre;
}
public function setMainDOeuvre(?string $mainDOeuvre): self
{
$this->mainDOeuvre = $mainDOeuvre;
return $this;
}
public function getZoneDIntervention(): ?string
{
return $this->zoneDIntervention;
}
public function setZoneDIntervention(?string $zoneDIntervention): self
{
$this->zoneDIntervention = $zoneDIntervention;
return $this;
}
public function isEstSupprime(): ?bool
{
return $this->estSupprime;
}
public function setEstSupprime(?bool $estSupprime): self
{
$this->estSupprime = $estSupprime;
return $this;
}
public function getPushNotificationToken(): ?string
{
return $this->pushNotificationToken;
}
public function setPushNotificationToken(?string $pushNotificationToken): self
{
$this->pushNotificationToken = $pushNotificationToken;
return $this;
}
public function getTelephone(): ?string
{
return $this->telephone;
}
public function setTelephone(?string $telephone): self
{
$this->telephone = $telephone;
return $this;
}
public function getSolde(): ?float
{
return $this->solde;
}
public function setSolde(?float $solde): self
{
$this->solde = $solde;
return $this;
}
}