<?php
namespace App\Entity;
use Serializable;
use Doctrine\ORM\Mapping as ORM;
use App\Repository\UserRepository;
use Doctrine\Common\Collections\Collection;
use Symfony\Component\HttpFoundation\File\File;
use Vich\UploaderBundle\Mapping\Annotation as Vich;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Andante\SoftDeletableBundle\SoftDeletable\SoftDeletableTrait;
use Andante\SoftDeletableBundle\SoftDeletable\SoftDeletableInterface;
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
/**
* @ORM\Entity(repositoryClass=UserRepository::class)
* @UniqueEntity(
* fields= {"email"},
* message= "Email déjà existe"
* )
* @Vich\Uploadable
*/
class User implements UserInterface, PasswordAuthenticatedUserInterface, \Serializable, SoftDeletableInterface
{
use SoftDeletableTrait;
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=180, unique=true, nullable=true)
* @Assert\Email(message = "The email '{{ value }}' is not a valid email.")
*/
private $email;
/**
* @ORM\Column(type="json")
*/
private $roles = [];
/**
* @var string The hashed password
* @ORM\Column(type="string")
* @Assert\Length(min="8", minMessage="8 caracteres minimum")
*/
private $password;
/**
* Undocumented variable
* @Assert\EqualTo(propertyPath="password", message="Mot de passe different")
* @var [type]
*/
public $confirm_password;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $designation;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $phone;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $phonetwo;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $phonethree;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $ordre;
/**
* @ORM\Column(type="boolean")
*/
private $is_active = false;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $firstname;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $lastname;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $is_acceptcgv;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $address;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $pays;
/**
* @ORM\OneToMany(targetEntity=Proposition::class, mappedBy="user")
*/
private $propositions;
/**
* @ORM\ManyToOne(targetEntity=Speciality::class, inversedBy="users")
*/
private $speciality;
/**
* @ORM\OneToMany(targetEntity=Order::class, mappedBy="user")
*/
private $orders;
/**
* @ORM\ManyToOne(targetEntity=Ville::class, inversedBy="users")
* @ORM\JoinColumn(nullable=true)
*/
private $ville;
/**
* @ORM\ManyToOne(targetEntity=Quartier::class, inversedBy="users")
* @ORM\JoinColumn(nullable=true)
*/
private $quartier;
/**
* @ORM\OneToMany(targetEntity=GroupSuggestion::class, mappedBy="user")
*/
private $groupSuggestions;
/**
* @ORM\OneToMany(targetEntity=Order::class, mappedBy="grossiste")
*/
private $ordersGrossistes;
/**
* @ORM\ManyToOne(targetEntity=User::class, inversedBy="users")
*/
private $grossiste;
/**
* @ORM\OneToMany(targetEntity=User::class, mappedBy="grossiste")
*/
private $users;
/**
* @ORM\OneToMany(targetEntity=Cart::class, mappedBy="user")
*/
private $carts;
/**
* @ORM\OneToMany(targetEntity=Stockpharmacie::class, mappedBy="user", orphanRemoval=true)
*/
private $stockpharmacies;
/**
* @ORM\OneToMany(targetEntity=HistoriqueRefusProposition::class, mappedBy="pharmcie")
*/
private $historiqueRefusPropositions;
/**
* @ORM\ManyToOne(targetEntity=Pays::class, inversedBy="users")
* @ORM\OrderBy({"name" = "ASC"})
*/
private $payslocalisation;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $urlexcelcmd;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $isPaid;
/**
* @ORM\OneToMany(targetEntity=Discution::class, mappedBy="user")
*/
private $discutions;
/**
* @ORM\OneToMany(targetEntity=Reclamation::class, mappedBy="user", orphanRemoval=true)
*/
private $reclamations;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $image;
/**
* @Vich\UploadableField(mapping="user_image", fileNameProperty="image")
* @var File|null
* @Assert\Image(
* mimeTypes = {"image/jpeg", "image/gif", "image/png", "image/jpg"},
* )
*/
private $imageFile;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $updatedAt;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $verificationCode;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $verified;
/**
* @ORM\OneToMany(targetEntity=Forecast::class, mappedBy="user")
*/
private $forecasts;
/**
* @ORM\OneToMany(targetEntity=UserTypepaiement::class, mappedBy="users")
*/
private $userTypepaiements;
/**
*
*/
private $typepaiements;
/**
* @ORM\OneToMany(targetEntity=HistoriquePaiement::class, mappedBy="user")
*/
private $historiquePaiements;
/**
* @ORM\OneToMany(targetEntity=Forecast::class, mappedBy="grossiste")
*/
private $instances_forecasts;
/**
* @ORM\ManyToOne(targetEntity=IctusPharmacie::class, inversedBy="users", cascade={"persist"})
*/
private $ictusPharmacie;
/**
* @ORM\OneToMany(targetEntity=IctusPanierPatient::class, mappedBy="user")
*/
private $ictusPanierPatients;
/**
* @ORM\OneToMany(targetEntity=IctusCommande::class, mappedBy="user")
*/
private $ictusCommandes;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $latitude;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $logitude;
/**
* @ORM\OneToMany(targetEntity=IctoRemboursement::class, mappedBy="payeur")
*/
private $ictoRemboursements;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $cguaccepted;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $isAdmin;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $CIN;
/**
* @ORM\OneToMany(targetEntity=Ordonnance::class, mappedBy="propriertaire", orphanRemoval=true)
*/
private $ordonnances;
/**
* @ORM\OneToMany(targetEntity=Adresse::class, mappedBy="patient")
*/
private $adresses;
/**
* @ORM\ManyToOne(targetEntity=SocieteLivraison::class, inversedBy="users")
*/
private $societeLivraison;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $reinitmdp;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $validate_code;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $expiredreinitmdp;
/**
* @ORM\OneToMany(targetEntity=IctusPanierSpecial::class, mappedBy="user", orphanRemoval=true)
*/
private $ictusPanierSpecials;
/**
* @ORM\OneToMany(targetEntity=CommandeSpecial::class, mappedBy="grossiste")
*/
private $commandeSpecials;
/**
* @ORM\OneToMany(targetEntity=CommandeSpecial::class, mappedBy="user")
*/
private $commandeSpecialsIctus;
/**
* @ORM\OneToMany(targetEntity=NonDisponibilite::class, mappedBy="livreur")
*/
private $nonDisponibilites;
/**
* @ORM\OneToMany(targetEntity=FacturePatient::class, mappedBy="User", orphanRemoval=true)
*/
private $facturePatients;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $referenceClientTP;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $societename;
/**
* @ORM\Column(type="date", nullable=true)
*/
private $datenaissance;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $fcm_token;
/**
* @ORM\OneToMany(targetEntity=IctusReclamation::class, mappedBy="user", orphanRemoval=true)
*/
private $ictusReclamations;
/**
* @ORM\OneToMany(targetEntity=IctusMobileAppareil::class, mappedBy="user", orphanRemoval=true)
*/
private $ictusMobileAppareils;
/*
* @ORM\OneToMany(targetEntity=Livraison::class, mappedBy="livreur")
*/
private $livraisons;
/**
* @ORM\OneToMany(targetEntity=Parcours::class, mappedBy="patient")
*/
private $parcours;
/**
* @ORM\OneToMany(targetEntity=Photo::class, mappedBy="creator")
*/
private $photoscreate;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $rangphoto;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $serviceSopharmad;
/**
* @ORM\OneToMany(targetEntity=IctoMouvement::class, mappedBy="user")
*/
private $ictoMouvements;
/**
* @ORM\OneToMany(targetEntity=Doublon::class, mappedBy="user")
*/
private $doublons;
/**
* @ORM\OneToMany(targetEntity=Rate::class, mappedBy="user", orphanRemoval=true)
*/
private $rates;
/**
* @ORM\OneToMany(targetEntity=SearchHistory::class, mappedBy="user")
*/
private $searchHistories;
/**
* @ORM\ManyToOne(targetEntity=IctusTypeLivraison::class, inversedBy="users")
*/
private $lastTypeLivraison;
/**
* @ORM\ManyToOne(targetEntity=IctusTypePaiement::class, inversedBy="users")
*/
private $lastTypePaiement;
public function __construct()
{
$this->propositions = new ArrayCollection();
$this->orders = new ArrayCollection();
$this->groupSuggestions = new ArrayCollection();
$this->ordersGrossistes = new ArrayCollection();
$this->users = new ArrayCollection();
$this->carts = new ArrayCollection();
$this->stockpharmacies = new ArrayCollection();
$this->historiqueRefusPropositions = new ArrayCollection();
$this->discutions = new ArrayCollection();
$this->reclamations = new ArrayCollection();
$this->forecasts = new ArrayCollection();
$this->userTypepaiements = new ArrayCollection();
$this->historiquePaiements = new ArrayCollection();
$this->instances_forecasts = new ArrayCollection();
$this->ictusPanierPatients = new ArrayCollection();
$this->ictusCommandes = new ArrayCollection();
$this->ictoRemboursements = new ArrayCollection();
$this->is_acceptcgv = new \DateTime();
$this->cguaccepted = new \DateTime();
$this->ordonnances = new ArrayCollection();
$this->adresses = new ArrayCollection();
$this->ictusPanierSpecials = new ArrayCollection();
$this->commandeSpecials = new ArrayCollection();
$this->commandeSpecialsIctus = new ArrayCollection();
$this->nonDisponibilites = new ArrayCollection();
$this->facturePatients = new ArrayCollection();
$this->ictusReclamations = new ArrayCollection();
$this->ictusMobileAppareils = new ArrayCollection();
$this->livraisons = new ArrayCollection();
$this->parcours = new ArrayCollection();
$this->photoscreate = new ArrayCollection();
$this->ictoMouvements = new ArrayCollection();
$this->doublons = new ArrayCollection();
$this->rates = new ArrayCollection();
$this->searchHistories = new ArrayCollection();
}
public function getNomComplet()
{
return $this->firstname . ' ' . $this->lastname;
}
public function getId(): ?int
{
return $this->id;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(?string $email): self
{
$this->email = $email;
return $this;
}
/**
* A visual identifier that represents this user.
*
* @see UserInterface
*/
public function getUserIdentifier(): ?string
{
return (string) $this->email;
}
/**
* @deprecated since Symfony 5.3, use getUserIdentifier instead
*/
public function getUsername(): ?string
{
return (string) $this->email;
}
/**
* @see UserInterface
*/
public function getRoles(): array
{
$roles = $this->roles;
// guarantee every user at least has ROLE_USER
$roles[] = 'ROLE_USER';
return array_unique($roles);
}
public function setRoles(array $roles): self
{
$this->roles = $roles;
return $this;
}
/**
* @see PasswordAuthenticatedUserInterface
*/
public function getPassword(): string
{
return $this->password;
}
public function setPassword(string $password): self
{
$this->password = $password;
return $this;
}
/**
* Returning a salt is only needed, if you are not using a modern
* hashing algorithm (e.g. bcrypt or sodium) in your security.yaml.
*
* @see UserInterface
*/
public function getSalt(): ?string
{
return null;
}
/**
* @see UserInterface
*/
public function eraseCredentials() {}
public function getDesignation(): ?string
{
return $this->designation;
}
public function setDesignation(?string $designation): self
{
$this->designation = $designation;
return $this;
}
public function getPhone(): ?string
{
return $this->phone;
}
public function setPhone(?string $phone): self
{
$this->phone = $phone;
return $this;
}
public function getPhonetwo(): ?string
{
return $this->phonetwo;
}
public function setPhonetwo(?string $phonetwo): self
{
$this->phonetwo = $phonetwo;
return $this;
}
public function getPhonethree(): ?string
{
return $this->phonethree;
}
public function setPhonethree(?string $phonethree): self
{
$this->phonethree = $phonethree;
return $this;
}
public function getOrdre(): ?string
{
return $this->ordre;
}
public function setOrdre(?string $ordre): self
{
$this->ordre = $ordre;
return $this;
}
public function getIsActive(): ?bool
{
return $this->is_active;
}
public function setIsActive(bool $is_active): self
{
$this->is_active = $is_active;
return $this;
}
public function getFirstname(): ?string
{
return $this->firstname;
}
public function setFirstname(?string $firstname): self
{
$this->firstname = $firstname;
return $this;
}
public function getLastname(): ?string
{
return $this->lastname;
}
public function setLastname(?string $lastname): self
{
$this->lastname = $lastname;
return $this;
}
public function getFullName()
{
return $this->firstname . ' ' . $this->lastname;
}
public function getIsAcceptcgv(): ?\DateTimeInterface
{
return $this->is_acceptcgv;
}
public function setIsAcceptcgv(?\DateTimeInterface $is_acceptcgv): self
{
$this->is_acceptcgv = $is_acceptcgv;
return $this;
}
public function getAddress(): ?string
{
return $this->address;
}
public function getCompleteAddress()
{
return $this->address . ', ' . $this->getQuartier() . ', ' . $this->getVille();
}
public function setAddress(?string $address): self
{
$this->address = $address;
return $this;
}
public function getPays(): ?string
{
return $this->pays;
}
public function setPays(?string $pays): self
{
$this->pays = $pays;
return $this;
}
/**
* @return Collection<int, Proposition>
*/
public function getPropositions(): Collection
{
return $this->propositions;
}
public function addProposition(Proposition $proposition): self
{
if (!$this->propositions->contains($proposition)) {
$this->propositions[] = $proposition;
$proposition->setUser($this);
}
return $this;
}
public function removeProposition(Proposition $proposition): self
{
if ($this->propositions->removeElement($proposition)) {
// set the owning side to null (unless already changed)
if ($proposition->getUser() === $this) {
$proposition->setUser(null);
}
}
return $this;
}
public function getSpeciality(): ?Speciality
{
return $this->speciality;
}
public function setSpeciality(?Speciality $speciality): self
{
$this->speciality = $speciality;
return $this;
}
/**
* @return Collection<int, Order>
*/
public function getOrders(): Collection
{
return $this->orders;
}
public function addOrder(Order $order): self
{
if (!$this->orders->contains($order)) {
$this->orders[] = $order;
$order->setUser($this);
}
return $this;
}
public function removeOrder(Order $order): self
{
if ($this->orders->removeElement($order)) {
// set the owning side to null (unless already changed)
if ($order->getUser() === $this) {
$order->setUser(null);
}
}
return $this;
}
public function getVille(): ?Ville
{
return $this->ville;
}
public function setVille(?Ville $ville): self
{
$this->ville = $ville;
return $this;
}
public function getQuartier(): ?Quartier
{
return $this->quartier;
}
public function setQuartier(?Quartier $quartier): self
{
$this->quartier = $quartier;
return $this;
}
/**
* @return Collection<int, GroupSuggestion>
*/
public function getGroupSuggestions(): Collection
{
return $this->groupSuggestions;
}
public function addGroupSuggestion(GroupSuggestion $groupSuggestion): self
{
if (!$this->groupSuggestions->contains($groupSuggestion)) {
$this->groupSuggestions[] = $groupSuggestion;
$groupSuggestion->setUser($this);
}
return $this;
}
public function removeGroupSuggestion(GroupSuggestion $groupSuggestion): self
{
if ($this->groupSuggestions->removeElement($groupSuggestion)) {
// set the owning side to null (unless already changed)
if ($groupSuggestion->getUser() === $this) {
$groupSuggestion->setUser(null);
}
}
return $this;
}
/**
* @return Collection<int, Order>
*/
public function getOrdersGrossistes(): Collection
{
return $this->ordersGrossistes;
}
public function addOrdersGrossiste(Order $ordersGrossiste): self
{
if (!$this->ordersGrossistes->contains($ordersGrossiste)) {
$this->ordersGrossistes[] = $ordersGrossiste;
$ordersGrossiste->setGrossiste($this);
}
return $this;
}
public function removeOrdersGrossiste(Order $ordersGrossiste): self
{
if ($this->ordersGrossistes->removeElement($ordersGrossiste)) {
// set the owning side to null (unless already changed)
if ($ordersGrossiste->getGrossiste() === $this) {
$ordersGrossiste->setGrossiste(null);
}
}
return $this;
}
public function getGrossiste(): ?self
{
return $this->grossiste;
}
public function setGrossiste(?self $grossiste): self
{
$this->grossiste = $grossiste;
return $this;
}
/**
* @return Collection<int, self>
*/
public function getUsers(): Collection
{
return $this->users;
}
public function addUser(self $user): self
{
if (!$this->users->contains($user)) {
$this->users[] = $user;
$user->setGrossiste($this);
}
return $this;
}
public function removeUser(self $user): self
{
if ($this->users->removeElement($user)) {
// set the owning side to null (unless already changed)
if ($user->getGrossiste() === $this) {
$user->setGrossiste(null);
}
}
return $this;
}
/**
* @return Collection<int, Cart>
*/
public function getCarts(): Collection
{
return $this->carts;
}
public function addCart(Cart $cart): self
{
if (!$this->carts->contains($cart)) {
$this->carts[] = $cart;
$cart->setUser($this);
}
return $this;
}
public function removeCart(Cart $cart): self
{
if ($this->carts->removeElement($cart)) {
// set the owning side to null (unless already changed)
if ($cart->getUser() === $this) {
$cart->setUser(null);
}
}
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->setUser($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->getUser() === $this) {
$stockpharmacy->setUser(null);
}
}
return $this;
}
/**
* @return Collection<int, HistoriqueRefusProposition>
*/
public function getHistoriqueRefusPropositions(): Collection
{
return $this->historiqueRefusPropositions;
}
public function addHistoriqueRefusProposition(HistoriqueRefusProposition $historiqueRefusProposition): self
{
if (!$this->historiqueRefusPropositions->contains($historiqueRefusProposition)) {
$this->historiqueRefusPropositions[] = $historiqueRefusProposition;
$historiqueRefusProposition->setPharmcie($this);
}
return $this;
}
public function removeHistoriqueRefusProposition(HistoriqueRefusProposition $historiqueRefusProposition): self
{
if ($this->historiqueRefusPropositions->removeElement($historiqueRefusProposition)) {
// set the owning side to null (unless already changed)
if ($historiqueRefusProposition->getPharmcie() === $this) {
$historiqueRefusProposition->setPharmcie(null);
}
}
return $this;
}
public function getPayslocalisation(): ?Pays
{
return $this->payslocalisation;
}
public function setPayslocalisation(?Pays $payslocalisation): self
{
$this->payslocalisation = $payslocalisation;
return $this;
}
public function getUrlexcelcmd(): ?string
{
return $this->urlexcelcmd;
}
public function setUrlexcelcmd(?string $urlexcelcmd): self
{
$this->urlexcelcmd = $urlexcelcmd;
return $this;
}
public function getIsPaid(): ?bool
{
return $this->isPaid;
}
public function setIsPaid(?bool $isPaid): self
{
$this->isPaid = $isPaid;
return $this;
}
/**
* @return Collection<int, Discution>
*/
public function getDiscutions(): Collection
{
return $this->discutions;
}
public function addDiscution(Discution $discution): self
{
if (!$this->discutions->contains($discution)) {
$this->discutions[] = $discution;
$discution->setUser($this);
}
return $this;
}
public function removeDiscution(Discution $discution): self
{
if ($this->discutions->removeElement($discution)) {
// set the owning side to null (unless already changed)
if ($discution->getUser() === $this) {
$discution->setUser(null);
}
}
return $this;
}
/**
* @return Collection<int, Reclamation>
*/
public function getReclamations(): Collection
{
return $this->reclamations;
}
public function addReclamation(Reclamation $reclamation): self
{
if (!$this->reclamations->contains($reclamation)) {
$this->reclamations[] = $reclamation;
$reclamation->setUser($this);
}
return $this;
}
public function removeReclamation(Reclamation $reclamation): self
{
if ($this->reclamations->removeElement($reclamation)) {
// set the owning side to null (unless already changed)
if ($reclamation->getUser() === $this) {
$reclamation->setUser(null);
}
}
return $this;
}
public function getImage(): ?string
{
return $this->image;
}
public function setImage(?string $image): self
{
$this->image = $image;
return $this;
}
public function getUpdatedAt(): ?\DateTimeInterface
{
return $this->updatedAt;
}
public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
{
$this->updatedAt = $updatedAt;
return $this;
}
//pour l'upload image
public function setImageFile(?File $imageFile = null): User
{
$this->imageFile = $imageFile;
if ($imageFile instanceof UploadedFile) {
$this->updatedAt = new \DateTime('now');
}
return $this;
}
public function getImageFile(): ?File
{
return $this->imageFile;
}
public function serialize()
{
return serialize(array(
$this->id,
$this->email,
$this->password,
));
}
public function unserialize($serialized)
{
list(
$this->id,
$this->email,
$this->password,
) = unserialize($serialized);
}
public function getVerificationCode(): ?string
{
return $this->verificationCode;
}
public function setVerificationCode(?string $verificationCode): self
{
$this->verificationCode = $verificationCode;
return $this;
}
public function getVerified(): ?int
{
return $this->verified;
}
public function setVerified(?int $verified): self
{
$this->verified = $verified;
return $this;
}
/**
* @return Collection<int, Forecast>
*/
public function getForecasts(): Collection
{
return $this->forecasts;
}
public function addForecast(Forecast $forecast): self
{
if (!$this->forecasts->contains($forecast)) {
$this->forecasts[] = $forecast;
$forecast->setUser($this);
}
return $this;
}
public function removeForecast(Forecast $forecast): self
{
if ($this->forecasts->removeElement($forecast)) {
// set the owning side to null (unless already changed)
if ($forecast->getUser() === $this) {
$forecast->setUser(null);
}
}
return $this;
}
/**
* @return Collection<int, UserTypepaiement>
*/
public function getUserTypepaiements(): Collection
{
return $this->userTypepaiements;
}
public function addUserTypepaiement(UserTypepaiement $userTypepaiement): self
{
if (!$this->userTypepaiements->contains($userTypepaiement)) {
$this->userTypepaiements[] = $userTypepaiement;
$userTypepaiement->setUsers($this);
}
return $this;
}
public function removeUserTypepaiement(UserTypepaiement $userTypepaiement): self
{
if ($this->userTypepaiements->removeElement($userTypepaiement)) {
// set the owning side to null (unless already changed)
if ($userTypepaiement->getUsers() === $this) {
$userTypepaiement->setUsers(null);
}
}
return $this;
}
public function getTypepaiements(): ?Typepaiement
{
return $this->typepaiements;
}
public function setTypepaiements(?Typepaiement $typepaiements): self
{
$this->typepaiements = $typepaiements;
return $this;
}
/**
* @return Collection<int, HistoriquePaiement>
*/
public function getHistoriquePaiements(): Collection
{
return $this->historiquePaiements;
}
public function addHistoriquePaiement(HistoriquePaiement $historiquePaiement): self
{
if (!$this->historiquePaiements->contains($historiquePaiement)) {
$this->historiquePaiements[] = $historiquePaiement;
$historiquePaiement->setUser($this);
}
return $this;
}
public function removeHistoriquePaiement(HistoriquePaiement $historiquePaiement): self
{
if ($this->historiquePaiements->removeElement($historiquePaiement)) {
// set the owning side to null (unless already changed)
if ($historiquePaiement->getUser() === $this) {
$historiquePaiement->setUser(null);
}
}
return $this;
}
/**
* @return Collection<int, Forecast>
*/
public function getInstancesForecasts(): Collection
{
return $this->instances_forecasts;
}
public function addInstancesForecast(Forecast $instancesForecast): self
{
if (!$this->instances_forecasts->contains($instancesForecast)) {
$this->instances_forecasts[] = $instancesForecast;
$instancesForecast->setGrossiste($this);
}
return $this;
}
public function removeInstancesForecast(Forecast $instancesForecast): self
{
if ($this->instances_forecasts->removeElement($instancesForecast)) {
// set the owning side to null (unless already changed)
if ($instancesForecast->getGrossiste() === $this) {
$instancesForecast->setGrossiste(null);
}
}
return $this;
}
public function getIctusPharmacie(): ?IctusPharmacie
{
return $this->ictusPharmacie;
}
public function setIctusPharmacie(?IctusPharmacie $ictusPharmacie): self
{
$this->ictusPharmacie = $ictusPharmacie;
return $this;
}
/**
* @return Collection<int, IctusPanierPatient>
*/
public function getIctusPanierPatients(): Collection
{
return $this->ictusPanierPatients;
}
public function addIctusPanierPatient(IctusPanierPatient $ictusPanierPatient): self
{
if (!$this->ictusPanierPatients->contains($ictusPanierPatient)) {
$this->ictusPanierPatients[] = $ictusPanierPatient;
$ictusPanierPatient->setUser($this);
}
return $this;
}
public function removeIctusPanierPatient(IctusPanierPatient $ictusPanierPatient): self
{
if ($this->ictusPanierPatients->removeElement($ictusPanierPatient)) {
// set the owning side to null (unless already changed)
if ($ictusPanierPatient->getUser() === $this) {
$ictusPanierPatient->setUser(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->setUser($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->getUser() === $this) {
$ictusCommande->setUser(null);
}
}
return $this;
}
public function getLatitude(): ?float
{
return $this->latitude;
}
public function setLatitude(?float $latitude): self
{
$this->latitude = $latitude;
return $this;
}
public function getLogitude(): ?float
{
return $this->logitude;
}
public function setLogitude(?float $logitude): self
{
$this->logitude = $logitude;
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->setPayeur($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->getPayeur() === $this) {
$ictoRemboursement->setPayeur(null);
}
}
return $this;
}
public function isCguaccepted(): ?\DateTimeInterface
{
return $this->cguaccepted;
}
public function setCguaccepted(?\DateTimeInterface $cguaccepted): self
{
$this->cguaccepted = $cguaccepted;
return $this;
}
public function isIsAdmin(): ?bool
{
return $this->isAdmin;
}
public function setIsAdmin(?bool $isAdmin): self
{
$this->isAdmin = $isAdmin;
return $this;
}
public function getCIN(): ?string
{
return $this->CIN;
}
public function setCIN(?string $CIN): self
{
$this->CIN = $CIN;
return $this;
}
/**
* @return Collection<int, Ordonnance>
*/
public function getOrdonnances(): Collection
{
return $this->ordonnances;
}
public function addOrdonnance(Ordonnance $ordonnance): self
{
if (!$this->ordonnances->contains($ordonnance)) {
$this->ordonnances[] = $ordonnance;
$ordonnance->setPropriertaire($this);
}
return $this;
}
public function removeOrdonnance(Ordonnance $ordonnance): self
{
if ($this->ordonnances->removeElement($ordonnance)) {
// set the owning side to null (unless already changed)
if ($ordonnance->getPropriertaire() === $this) {
$ordonnance->setPropriertaire(null);
}
}
return $this;
}
/**
* @return Collection<int, Adresse>
*/
public function getAdresses(): Collection
{
return $this->adresses;
}
public function addAdress(Adresse $adress): self
{
if (!$this->adresses->contains($adress)) {
$this->adresses[] = $adress;
$adress->setPatient($this);
}
return $this;
}
public function removeAdress(Adresse $adress): self
{
if ($this->adresses->removeElement($adress)) {
// set the owning side to null (unless already changed)
if ($adress->getPatient() === $this) {
$adress->setPatient(null);
}
}
return $this;
}
public function getSocieteLivraison(): ?SocieteLivraison
{
return $this->societeLivraison;
}
public function setSocieteLivraison(?SocieteLivraison $societeLivraison): self
{
$this->societeLivraison = $societeLivraison;
}
/**
* @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->setUser($this);
}
return $this;
}
public function getReinitmdp(): ?string
{
return $this->reinitmdp;
}
public function setReinitmdp(?string $reinitmdp): self
{
$this->reinitmdp = $reinitmdp;
return $this;
}
public function getValidateCode(): ?string
{
return $this->validate_code;
}
public function setValidateCode(?string $validate_code): self
{
$this->validate_code = $validate_code;
return $this;
}
public function removeIctusPanierSpecial(IctusPanierSpecial $ictusPanierSpecial): self
{
if ($this->ictusPanierSpecials->removeElement($ictusPanierSpecial)) {
// set the owning side to null (unless already changed)
if ($ictusPanierSpecial->getUser() === $this) {
$ictusPanierSpecial->setUser(null);
}
}
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->setGrossiste($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->getGrossiste() === $this) {
$commandeSpecial->setGrossiste(null);
}
}
return $this;
}
public function getExpiredreinitmdp(): ?\DateTimeInterface
{
return $this->expiredreinitmdp;
}
public function setExpiredreinitmdp(?\DateTimeInterface $expiredreinitmdp): self
{
$this->expiredreinitmdp = $expiredreinitmdp;
return $this;
}
/**
* @return Collection<int, CommandeSpecial>
*/
public function getCommandeSpecialsIctus(): Collection
{
return $this->commandeSpecialsIctus;
}
public function addCommandeSpecialsIctu(CommandeSpecial $commandeSpecialsIctu): self
{
if (!$this->commandeSpecialsIctus->contains($commandeSpecialsIctu)) {
$this->commandeSpecialsIctus[] = $commandeSpecialsIctu;
$commandeSpecialsIctu->setUser($this);
}
return $this;
}
public function removeCommandeSpecialsIctu(CommandeSpecial $commandeSpecialsIctu): self
{
if ($this->commandeSpecialsIctus->removeElement($commandeSpecialsIctu)) {
// set the owning side to null (unless already changed)
if ($commandeSpecialsIctu->getUser() === $this) {
$commandeSpecialsIctu->setUser(null);
}
}
return $this;
}
/**
* @return Collection<int, NonDisponibilite>
*/
public function getNonDisponibilites(): Collection
{
return $this->nonDisponibilites;
}
public function addNonDisponibilite(NonDisponibilite $nonDisponibilite): self
{
if (!$this->nonDisponibilites->contains($nonDisponibilite)) {
$this->nonDisponibilites[] = $nonDisponibilite;
$nonDisponibilite->setLivreur($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->setUser($this);
}
return $this;
}
public function removeNonDisponibilite(NonDisponibilite $nonDisponibilite): self
{
if ($this->nonDisponibilites->removeElement($nonDisponibilite)) {
// set the owning side to null (unless already changed)
if ($nonDisponibilite->getLivreur() === $this) {
$nonDisponibilite->setLivreur(null);
}
}
}
public function removeFacturePatient(FacturePatient $facturePatient): self
{
if ($this->facturePatients->removeElement($facturePatient)) {
// set the owning side to null (unless already changed)
if ($facturePatient->getUser() === $this) {
$facturePatient->setUser(null);
}
}
return $this;
}
public function getPanierTotal()
{
$total = 0;
foreach ($this->getIctusPanierPatients() as $panier) {
$total += $panier->getTotal();
}
return (int)$total;
}
public function getReferenceClientTP(): ?string
{
return $this->referenceClientTP;
}
public function setReferenceClientTP(?string $referenceClientTP): self
{
$this->referenceClientTP = $referenceClientTP;
return $this;
}
public function getSocietename(): ?string
{
return $this->societename;
}
public function setSocietename(?string $societename): self
{
$this->societename = $societename;
return $this;
}
public function getDatenaissance(): ?\DateTimeInterface
{
return $this->datenaissance;
}
public function setDatenaissance(?\DateTimeInterface $datenaissance): self
{
$this->datenaissance = $datenaissance;
return $this;
}
/**
* @return Collection<int, Livraison>
*/
public function getLivraisons(): Collection
{
return $this->livraisons;
}
public function addLivraison(Livraison $livraison): self
{
if (!$this->livraisons->contains($livraison)) {
$this->livraisons[] = $livraison;
$livraison->setLivreur($this);
}
return $this;
}
public function removeLivraison(Livraison $livraison): self
{
if ($this->livraisons->removeElement($livraison)) {
// set the owning side to null (unless already changed)
if ($livraison->getLivreur() === $this) {
$livraison->setLivreur(null);
}
}
return $this;
}
/**
* @return Collection<int, IctusMobileAppareil>
*/
public function getIctusMobileAppareils(): Collection
{
return $this->ictusMobileAppareils;
}
public function addIctusMobileAppareil(IctusMobileAppareil $ictusMobileAppareil): self
{
if (!$this->ictusMobileAppareils->contains($ictusMobileAppareil)) {
$this->ictusMobileAppareils[] = $ictusMobileAppareil;
$ictusMobileAppareil->setUser($this);
}
return $this;
}
public function removeIctusMobileAppareil(IctusMobileAppareil $ictusMobileAppareil): self
{
if ($this->ictusMobileAppareils->removeElement($ictusMobileAppareil)) {
// set the owning side to null (unless already changed)
if ($ictusMobileAppareil->getUser() === $this) {
$ictusMobileAppareil->setUser(null);
}
}
return $this;
}
/**
* @return Collection<int, Photo>
*/
public function getPhotoscreate(): Collection
{
return $this->photoscreate;
}
public function addPhotoscreate(Photo $photoscreate): self
{
if (!$this->photoscreate->contains($photoscreate)) {
$this->photoscreate[] = $photoscreate;
$photoscreate->setCreator($this);
}
return $this;
}
public function removePhotoscreate(Photo $photoscreate): self
{
if ($this->photoscreate->removeElement($photoscreate)) {
// set the owning side to null (unless already changed)
if ($photoscreate->getCreator() === $this) {
$photoscreate->setCreator(null);
}
}
return $this;
}
public function getRangphoto(): ?int
{
return $this->rangphoto;
}
public function setRangphoto(?int $rangphoto): self
{
$this->rangphoto = $rangphoto;
return $this;
}
public function getServiceSopharmad(): ?string
{
return $this->serviceSopharmad;
}
public function setServiceSopharmad(?string $serviceSopharmad): self
{
$this->serviceSopharmad = $serviceSopharmad;
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->setUser($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->getUser() === $this) {
$ictoMouvement->setUser(null);
}
}
return $this;
}
/**
* @return Collection<int, Doublon>
*/
public function getDoublons(): Collection
{
return $this->doublons;
}
public function addDoublon(Doublon $doublon): self
{
if (!$this->doublons->contains($doublon)) {
$this->doublons[] = $doublon;
$doublon->setUser($this);
}
return $this;
}
public function removeDoublon(Doublon $doublon): self
{
if ($this->doublons->removeElement($doublon)) {
// set the owning side to null (unless already changed)
if ($doublon->getUser() === $this) {
$doublon->setUser(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->setUser($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->getUser() === $this) {
$rate->setUser(null);
}
}
return $this;
}
/**
* @return Collection<int, SearchHistory>
*/
public function getSearchHistories(): Collection
{
return $this->searchHistories;
}
public function addSearchHistory(SearchHistory $searchHistory): self
{
if (!$this->searchHistories->contains($searchHistory)) {
$this->searchHistories[] = $searchHistory;
$searchHistory->setUser($this);
}
return $this;
}
public function removeSearchHistory(SearchHistory $searchHistory): self
{
if ($this->searchHistories->removeElement($searchHistory)) {
// set the owning side to null (unless already changed)
if ($searchHistory->getUser() === $this) {
$searchHistory->setUser(null);
}
}
return $this;
}
public function getLastTypeLivraison(): ?IctusTypeLivraison
{
return $this->lastTypeLivraison;
}
public function setLastTypeLivraison(?IctusTypeLivraison $lastTypeLivraison): self
{
$this->lastTypeLivraison = $lastTypeLivraison;
return $this;
}
public function getLastTypePaiement(): ?IctusTypePaiement
{
return $this->lastTypePaiement;
}
public function setLastTypePaiement(?IctusTypePaiement $lastTypePaiement): self
{
$this->lastTypePaiement = $lastTypePaiement;
return $this;
}
public function getFcmToken(): ?string
{
return $this->fcm_token;
}
public function setFcmToken(?string $fcm_token): self
{
$this->fcm_token = $fcm_token;
return $this;
}
}