<?php
namespace App\Entity;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
use App\Validator\Constraints as CustomAssert;
use Doctrine\Common\Collections\Collection;
use App\Repository\IctusPharmacieRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
/**
* @ORM\Entity(repositoryClass=IctusPharmacieRepository::class)
* @UniqueEntity(fields = {"pagename"},message ="Page existe déjà existe")
*/
class IctusPharmacie
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $uuid;
/**
* @ORM\Column(type="string", length=255)
*/
private $designation;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $logo;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $numeroordre;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $nif;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $stat;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $isValid = false;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $logitude;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $latitude;
/**
* @ORM\OneToMany(targetEntity=Stockpharmacie::class, mappedBy="ictuspharmacie")
*/
private $stockpharmacies;
/**
* @ORM\OneToMany(targetEntity=User::class, mappedBy="ictusPharmacie")
*/
private $users;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $adresse;
/**
* @ORM\ManyToOne(targetEntity=Quartier::class, inversedBy="ictusPharmacies")
*/
private $quartier;
/**
* @ORM\OneToMany(targetEntity=LivraisonPharmacie::class, mappedBy="ictus_pharmacie")
*/
private $livraisonPharmacies;
/**
* @ORM\OneToMany(targetEntity=IctusPaiementPharmacie::class, mappedBy="pharmacie")
*/
private $ictusPaiementPharmacies;
/**
* @ORM\OneToMany(targetEntity=IctusHoraire::class, mappedBy="ictus_pharmacie")
*/
private $ictusHoraires;
/**
* @ORM\OneToMany(targetEntity=IctusCommande::class, mappedBy="pharmacie")
*/
private $ictusCommandes;
private $distanceParRapportPatient;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $photocouverture;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $pagename;
/**
* @ORM\OneToMany(targetEntity=IctoRemboursement::class, mappedBy="demandeur", orphanRemoval=true)
*/
private $ictoRemboursements;
/**
* @ORM\OneToMany(targetEntity=IctoParampov::class, mappedBy="pharmacie", orphanRemoval=true)
*/
private $ictoParampovs;
/**
* @ORM\OneToMany(targetEntity=IctoMouvement::class, mappedBy="pharmacie", orphanRemoval=true)
*/
private $ictoMouvements;
/**
* @ORM\OneToMany(targetEntity=AchatIctocoin::class, mappedBy="pharmacie", orphanRemoval=true)
*/
private $achatIctocoins;
/**
* @ORM\OneToMany(targetEntity=IctusPanierSpecial::class, mappedBy="pharmacie", orphanRemoval=true)
*/
private $ictusPanierSpecials;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $isCommandeSpecial;
/**
* @ORM\OneToMany(targetEntity=CommandeSpecial::class, mappedBy="pharmacie")
*/
private $commandeSpecials;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $isValideAutomatique;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $pourcentageCommandeSpecial;
/**
* @ORM\OneToMany(targetEntity=FacturePatient::class, mappedBy="pharmacie", orphanRemoval=true)
*/
private $facturePatients;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $rcs;
/**
* @ORM\OneToMany(targetEntity=ProductBlackList::class, mappedBy="pharmacie", orphanRemoval=true)
*/
private $productBlackLists;
/**
* @ORM\OneToMany(targetEntity=HistoriqueMaj::class, mappedBy="pharmacie", orphanRemoval=true)
*/
private $historiqueMajs;
/**
* @ORM\ManyToMany(targetEntity=Tierpayant::class, mappedBy="pharmacie")
*/
private $tierpayants;
/**
* @ORM\OneToMany(targetEntity=Parcours::class, mappedBy="pharmacie")
*/
private $parcours;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $mailResponsable;
/**
* @ORM\OneToMany(targetEntity=FacturePharmacie::class, mappedBy="pharmacie", orphanRemoval=true)
*/
private $facturePharmacies;
/**
* @ORM\OneToMany(targetEntity=Rate::class, mappedBy="pharmacie")
*/
private $rates;
/**
* @ORM\OneToMany(targetEntity=IctusReclamation::class, mappedBy="pharmacie")
*/
private $ictusReclamations;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $realDesignation;
public function __construct()
{
$this->stockpharmacies = new ArrayCollection();
$this->users = new ArrayCollection();
$this->uuid = uniqid((new \DateTime())->format('YmdHis'));
$this->livraisonPharmacies = new ArrayCollection();
$this->ictusPaiementPharmacies = new ArrayCollection();
$this->ictusHoraires = new ArrayCollection();
$this->ictusCommandes = new ArrayCollection();
$this->ictoRemboursements = new ArrayCollection();
$this->ictoParampovs = new ArrayCollection();
$this->ictoMouvements = new ArrayCollection();
$this->achatIctocoins = new ArrayCollection();
$this->ictusPanierSpecials = new ArrayCollection();
$this->commandeSpecials = new ArrayCollection();
$this->facturePatients = new ArrayCollection();
$this->productBlackLists = new ArrayCollection();
$this->historiqueMajs = new ArrayCollection();
$this->tierpayants = new ArrayCollection();
$this->parcours = new ArrayCollection();
$this->facturePharmacies = new ArrayCollection();
$this->rates = new ArrayCollection();
$this->ictusReclamations = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function setId($id) {
$this->id = $id;
return $this;
}
public function getUuid(): ?string
{
return $this->uuid;
}
public function setUuid(?string $uuid): self
{
$this->uuid = $uuid;
return $this;
}
public function getDesignation(): ?string
{
return $this->designation;
}
public function setDesignation(string $designation): self
{
$this->designation = $designation;
return $this;
}
public function getLogo(): ?string
{
return $this->logo;
}
public function setLogo(?string $logo): self
{
$this->logo = $logo;
return $this;
}
public function getNumeroordre(): ?string
{
return $this->numeroordre;
}
public function setNumeroordre(?string $numeroordre): self
{
$this->numeroordre = $numeroordre;
return $this;
}
public function getNif(): ?string
{
return $this->nif;
}
public function setNif(?string $nif): self
{
$this->nif = $nif;
return $this;
}
public function getStat(): ?string
{
return $this->stat;
}
public function setStat(?string $stat): self
{
$this->stat = $stat;
return $this;
}
public function isIsValid(): ?bool
{
return $this->isValid;
}
public function setIsValid(?bool $isValid): self
{
$this->isValid = $isValid;
return $this;
}
public function getLogitude(): ?float
{
return $this->logitude;
}
public function setLogitude(?float $logitude): self
{
$this->logitude = $logitude;
return $this;
}
public function getLatitude(): ?float
{
return $this->latitude;
}
public function setLatitude(?float $latitude): self
{
$this->latitude = $latitude;
return $this;
}
/**
* @return Collection<int, Stockpharmacie>
*/
public function getStockpharmacies(): Collection
{
return $this->stockpharmacies;
}
public function addStockpharmacy(Stockpharmacie $stockpharmacy): self
{
if (!$this->stockpharmacies->contains($stockpharmacy)) {
$this->stockpharmacies[] = $stockpharmacy;
$stockpharmacy->setIctuspharmacie($this);
}
return $this;
}
public function removeStockpharmacy(Stockpharmacie $stockpharmacy): self
{
if ($this->stockpharmacies->removeElement($stockpharmacy)) {
// set the owning side to null (unless already changed)
if ($stockpharmacy->getIctuspharmacie() === $this) {
$stockpharmacy->setIctuspharmacie(null);
}
}
return $this;
}
/**
* @return Collection<int, User>
*/
public function getUsers(): Collection
{
return $this->users;
}
public function addUser(User $user): self
{
if (!$this->users->contains($user)) {
$this->users[] = $user;
$user->setIctusPharmacie($this);
}
return $this;
}
public function removeUser(User $user): self
{
if ($this->users->removeElement($user)) {
// set the owning side to null (unless already changed)
if ($user->getIctusPharmacie() === $this) {
$user->setIctusPharmacie(null);
}
}
return $this;
}
public function getAdresse(): ?string
{
return $this->adresse;
}
public function setAdresse(?string $adresse): self
{
$this->adresse = $adresse;
return $this;
}
public function getQuartier(): ?Quartier
{
return $this->quartier;
}
public function setQuartier(?Quartier $quartier): self
{
$this->quartier = $quartier;
return $this;
}
/**
* @return Collection<int, LivraisonPharmacie>
*/
public function getLivraisonPharmacies(): Collection
{
return $this->livraisonPharmacies;
}
public function addLivraisonPharmacy(LivraisonPharmacie $livraisonPharmacy): self
{
if (!$this->livraisonPharmacies->contains($livraisonPharmacy)) {
$this->livraisonPharmacies[] = $livraisonPharmacy;
$livraisonPharmacy->setIctusPharmacie($this);
}
return $this;
}
public function removeLivraisonPharmacy(LivraisonPharmacie $livraisonPharmacy): self
{
if ($this->livraisonPharmacies->removeElement($livraisonPharmacy)) {
// set the owning side to null (unless already changed)
if ($livraisonPharmacy->getIctusPharmacie() === $this) {
$livraisonPharmacy->setIctusPharmacie(null);
}
}
return $this;
}
/**
* @return Collection<int, IctusPaiementPharmacie>
*/
public function getIctusPaiementPharmacies(): Collection
{
return $this->ictusPaiementPharmacies;
}
public function addIctusPaiementPharmacy(IctusPaiementPharmacie $ictusPaiementPharmacy): self
{
if (!$this->ictusPaiementPharmacies->contains($ictusPaiementPharmacy)) {
$this->ictusPaiementPharmacies[] = $ictusPaiementPharmacy;
$ictusPaiementPharmacy->setPharmacie($this);
}
return $this;
}
public function removeIctusPaiementPharmacy(IctusPaiementPharmacie $ictusPaiementPharmacy): self
{
if ($this->ictusPaiementPharmacies->removeElement($ictusPaiementPharmacy)) {
// set the owning side to null (unless already changed)
if ($ictusPaiementPharmacy->getPharmacie() === $this) {
$ictusPaiementPharmacy->setPharmacie(null);
}
}
return $this;
}
/**
* @return Collection<int, IctusHoraire>
*/
public function getIctusHoraires(): Collection
{
return $this->ictusHoraires;
}
public function addIctusHoraire(IctusHoraire $ictusHoraire): self
{
if (!$this->ictusHoraires->contains($ictusHoraire)) {
$this->ictusHoraires[] = $ictusHoraire;
$ictusHoraire->setIctusPharmacie($this);
}
return $this;
}
public function removeIctusHoraire(IctusHoraire $ictusHoraire): self
{
if ($this->ictusHoraires->removeElement($ictusHoraire)) {
// set the owning side to null (unless already changed)
if ($ictusHoraire->getIctusPharmacie() === $this) {
$ictusHoraire->setIctusPharmacie(null);
}
}
return $this;
}
/**
* @return Collection<int, IctusCommande>
*/
public function getIctusCommandes(): Collection
{
return $this->ictusCommandes;
}
public function addIctusCommande(IctusCommande $ictusCommande): self
{
if (!$this->ictusCommandes->contains($ictusCommande)) {
$this->ictusCommandes[] = $ictusCommande;
$ictusCommande->setPharmacie($this);
}
return $this;
}
public function removeIctusCommande(IctusCommande $ictusCommande): self
{
if ($this->ictusCommandes->removeElement($ictusCommande)) {
// set the owning side to null (unless already changed)
if ($ictusCommande->getPharmacie() === $this) {
$ictusCommande->setPharmacie(null);
}
}
return $this;
}
/**
* Get the value of distanceParRapportPatient
*/
public function getDistanceParRapportPatient()
{
return $this->distanceParRapportPatient;
}
/**
* Set the value of distanceParRapportPatient
*
* @return self
*/
public function setDistanceParRapportPatient($distanceParRapportPatient)
{
$this->distanceParRapportPatient = $distanceParRapportPatient;
return $this;
}
public function getPhotocouverture(): ?string
{
return $this->photocouverture;
}
public function setPhotocouverture(?string $photocouverture): self
{
$this->photocouverture = $photocouverture;
return $this;
}
public function getPagename(): ?string
{
return $this->pagename;
}
public function setPagename(?string $pagename): self
{
$this->pagename = $pagename;
return $this;
}
/**
* @return Collection<int, IctoRemboursement>
*/
public function getIctoRemboursements(): Collection
{
return $this->ictoRemboursements;
}
public function addIctoRemboursement(IctoRemboursement $ictoRemboursement): self
{
if (!$this->ictoRemboursements->contains($ictoRemboursement)) {
$this->ictoRemboursements[] = $ictoRemboursement;
$ictoRemboursement->setDemandeur($this);
}
return $this;
}
public function removeIctoRemboursement(IctoRemboursement $ictoRemboursement): self
{
if ($this->ictoRemboursements->removeElement($ictoRemboursement)) {
// set the owning side to null (unless already changed)
if ($ictoRemboursement->getDemandeur() === $this) {
$ictoRemboursement->setDemandeur(null);
}
}
return $this;
}
/**
* @return Collection<int, IctoParampov>
*/
public function getIctoParampovs(): Collection
{
return $this->ictoParampovs;
}
public function addIctoParampov(IctoParampov $ictoParampov): self
{
if (!$this->ictoParampovs->contains($ictoParampov)) {
$this->ictoParampovs[] = $ictoParampov;
$ictoParampov->setPharmacie($this);
}
return $this;
}
public function removeIctoParampov(IctoParampov $ictoParampov): self
{
if ($this->ictoParampovs->removeElement($ictoParampov)) {
// set the owning side to null (unless already changed)
if ($ictoParampov->getPharmacie() === $this) {
$ictoParampov->setPharmacie(null);
}
}
return $this;
}
/**
* @return Collection<int, IctoMouvement>
*/
public function getIctoMouvements(): Collection
{
return $this->ictoMouvements;
}
public function addIctoMouvement(IctoMouvement $ictoMouvement): self
{
if (!$this->ictoMouvements->contains($ictoMouvement)) {
$this->ictoMouvements[] = $ictoMouvement;
$ictoMouvement->setPharmacie($this);
}
return $this;
}
public function removeIctoMouvement(IctoMouvement $ictoMouvement): self
{
if ($this->ictoMouvements->removeElement($ictoMouvement)) {
// set the owning side to null (unless already changed)
if ($ictoMouvement->getPharmacie() === $this) {
$ictoMouvement->setPharmacie(null);
}
}
return $this;
}
/**
* @return Collection<int, AchatIctocoin>
*/
public function getAchatIctocoins(): Collection
{
return $this->achatIctocoins;
}
public function addAchatIctocoin(AchatIctocoin $achatIctocoin): self
{
if (!$this->achatIctocoins->contains($achatIctocoin)) {
$this->achatIctocoins[] = $achatIctocoin;
$achatIctocoin->setPharmacie($this);
}
return $this;
}
public function removeAchatIctocoin(AchatIctocoin $achatIctocoin): self
{
if ($this->achatIctocoins->removeElement($achatIctocoin)) {
// set the owning side to null (unless already changed)
if ($achatIctocoin->getPharmacie() === $this) {
$achatIctocoin->setPharmacie(null);
}
}
return $this;
}
/**
* @return Collection<int, IctusPanierSpecial>
*/
public function getIctusPanierSpecials(): Collection
{
return $this->ictusPanierSpecials;
}
public function addIctusPanierSpecial(IctusPanierSpecial $ictusPanierSpecial): self
{
if (!$this->ictusPanierSpecials->contains($ictusPanierSpecial)) {
$this->ictusPanierSpecials[] = $ictusPanierSpecial;
$ictusPanierSpecial->setPharmacie($this);
}
return $this;
}
public function removeIctusPanierSpecial(IctusPanierSpecial $ictusPanierSpecial): self
{
if ($this->ictusPanierSpecials->removeElement($ictusPanierSpecial)) {
// set the owning side to null (unless already changed)
if ($ictusPanierSpecial->getPharmacie() === $this) {
$ictusPanierSpecial->setPharmacie(null);
}
}
return $this;
}
public function isIsCommandeSpecial(): ?bool
{
return $this->isCommandeSpecial;
}
public function setIsCommandeSpecial(?bool $isCommandeSpecial): self
{
$this->isCommandeSpecial = $isCommandeSpecial;
return $this;
}
/**
* @return Collection<int, CommandeSpecial>
*/
public function getCommandeSpecials(): Collection
{
return $this->commandeSpecials;
}
public function addCommandeSpecial(CommandeSpecial $commandeSpecial): self
{
if (!$this->commandeSpecials->contains($commandeSpecial)) {
$this->commandeSpecials[] = $commandeSpecial;
$commandeSpecial->setPharmacie($this);
}
return $this;
}
public function removeCommandeSpecial(CommandeSpecial $commandeSpecial): self
{
if ($this->commandeSpecials->removeElement($commandeSpecial)) {
// set the owning side to null (unless already changed)
if ($commandeSpecial->getPharmacie() === $this) {
$commandeSpecial->setPharmacie(null);
}
}
return $this;
}
public function isIsValideAutomatique(): ?bool
{
return $this->isValideAutomatique;
}
public function setIsValideAutomatique(?bool $isValideAutomatique): self
{
$this->isValideAutomatique = $isValideAutomatique;
return $this;
}
public function getPourcentageCommandeSpecial(): ?float
{
return $this->pourcentageCommandeSpecial;
}
public function setPourcentageCommandeSpecial(?float $pourcentageCommandeSpecial): self
{
$this->pourcentageCommandeSpecial = $pourcentageCommandeSpecial;
return $this;
}
/**
* @return Collection<int, FacturePatient>
*/
public function getFacturePatients(): Collection
{
return $this->facturePatients;
}
public function addFacturePatient(FacturePatient $facturePatient): self
{
if (!$this->facturePatients->contains($facturePatient)) {
$this->facturePatients[] = $facturePatient;
$facturePatient->setPharmacie($this);
}
return $this;
}
public function removeFacturePatient(FacturePatient $facturePatient): self
{
if ($this->facturePatients->removeElement($facturePatient)) {
// set the owning side to null (unless already changed)
if ($facturePatient->getPharmacie() === $this) {
$facturePatient->setPharmacie(null);
}
}
return $this;
}
public function getRcs(): ?string
{
return $this->rcs;
}
public function setRcs(?string $rcs): self
{
$this->rcs = $rcs;
return $this;
}
/**
* @return Collection<int, ProductBlackList>
*/
public function getProductBlackLists(): Collection
{
return $this->productBlackLists;
}
public function addProductBlackList(ProductBlackList $productBlackList): self
{
if (!$this->productBlackLists->contains($productBlackList)) {
$this->productBlackLists[] = $productBlackList;
$productBlackList->setPharmacie($this);
}
return $this;
}
public function removeProductBlackList(ProductBlackList $productBlackList): self
{
if ($this->productBlackLists->removeElement($productBlackList)) {
// set the owning side to null (unless already changed)
if ($productBlackList->getPharmacie() === $this) {
$productBlackList->setPharmacie(null);
}
}
return $this;
}
/**
* @return Collection<int, HistoriqueMaj>
*/
public function getHistoriqueMajs(): Collection
{
return $this->historiqueMajs;
}
public function addHistoriqueMaj(HistoriqueMaj $historiqueMaj): self
{
if (!$this->historiqueMajs->contains($historiqueMaj)) {
$this->historiqueMajs[] = $historiqueMaj;
$historiqueMaj->setPharmacie($this);
}
return $this;
}
public function removeHistoriqueMaj(HistoriqueMaj $historiqueMaj): self
{
if ($this->historiqueMajs->removeElement($historiqueMaj)) {
// set the owning side to null (unless already changed)
if ($historiqueMaj->getPharmacie() === $this) {
$historiqueMaj->setPharmacie(null);
}
}
return $this;
}
/**
* @return Collection<int, Tierpayant>
*/
public function getTierpayants(): Collection
{
return $this->tierpayants;
}
public function addTierpayant(Tierpayant $tierpayant): self
{
if (!$this->tierpayants->contains($tierpayant)) {
$this->tierpayants[] = $tierpayant;
$tierpayant->addPharmacie($this);
}
return $this;
}
public function removeTierpayant(Tierpayant $tierpayant): self
{
if ($this->tierpayants->removeElement($tierpayant)) {
$tierpayant->removePharmacie($this);
}
return $this;
}
public function getMailResponsable(): ?string
{
return $this->mailResponsable;
}
public function setMailResponsable(?string $mailResponsable): self
{
$this->mailResponsable = $mailResponsable;
return $this;
}
/**
* @return Collection<int, FacturePharmacie>
*/
public function getFacturePharmacies(): Collection
{
return $this->facturePharmacies;
}
public function addFacturePharmacy(FacturePharmacie $facturePharmacy): self
{
if (!$this->facturePharmacies->contains($facturePharmacy)) {
$this->facturePharmacies[] = $facturePharmacy;
$facturePharmacy->setPharmacie($this);
}
return $this;
}
public function removeFacturePharmacy(FacturePharmacie $facturePharmacy): self
{
if ($this->facturePharmacies->removeElement($facturePharmacy)) {
// set the owning side to null (unless already changed)
if ($facturePharmacy->getPharmacie() === $this) {
$facturePharmacy->setPharmacie(null);
}
}
return $this;
}
/**
* @return Collection<int, Rate>
*/
public function getRates(): Collection
{
return $this->rates;
}
public function addRate(Rate $rate): self
{
if (!$this->rates->contains($rate)) {
$this->rates[] = $rate;
$rate->setPharmacie($this);
}
return $this;
}
public function removeRate(Rate $rate): self
{
if ($this->rates->removeElement($rate)) {
// set the owning side to null (unless already changed)
if ($rate->getPharmacie() === $this) {
$rate->setPharmacie(null);
}
}
return $this;
}
/**
* @return Collection<int, IctusReclamation>
*/
public function getIctusReclamations(): Collection
{
return $this->ictusReclamations;
}
public function addIctusReclamation(IctusReclamation $ictusReclamation): self
{
if (!$this->ictusReclamations->contains($ictusReclamation)) {
$this->ictusReclamations[] = $ictusReclamation;
$ictusReclamation->setPharmacie($this);
}
return $this;
}
public function removeIctusReclamation(IctusReclamation $ictusReclamation): self
{
if ($this->ictusReclamations->removeElement($ictusReclamation)) {
// set the owning side to null (unless already changed)
if ($ictusReclamation->getPharmacie() === $this) {
$ictusReclamation->setPharmacie(null);
}
}
return $this;
}
public function getRealDesignation(): ?string
{
return $this->realDesignation;
}
public function setRealDesignation(?string $realDesignation): self
{
$this->realDesignation = $realDesignation;
return $this;
}
}