src/Entity/User.php line 28

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Serializable;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use App\Repository\UserRepository;
  6. use Doctrine\Common\Collections\Collection;
  7. use Symfony\Component\HttpFoundation\File\File;
  8. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  9. use Doctrine\Common\Collections\ArrayCollection;
  10. use Symfony\Component\Validator\Constraints as Assert;
  11. use Symfony\Component\Security\Core\User\UserInterface;
  12. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  13. use Andante\SoftDeletableBundle\SoftDeletable\SoftDeletableTrait;
  14. use Andante\SoftDeletableBundle\SoftDeletable\SoftDeletableInterface;
  15. use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
  16. /**
  17.  * @ORM\Entity(repositoryClass=UserRepository::class)
  18.  * @UniqueEntity(
  19.  * fields= {"email"},
  20.  * message= "Email déjà existe"
  21.  * )
  22.  * @Vich\Uploadable
  23.  */
  24. class User implements UserInterfacePasswordAuthenticatedUserInterface\SerializableSoftDeletableInterface
  25. {
  26.     use SoftDeletableTrait;
  27.     /**
  28.      * @ORM\Id
  29.      * @ORM\GeneratedValue
  30.      * @ORM\Column(type="integer")
  31.      */
  32.     private $id;
  33.     /**
  34.      * @ORM\Column(type="string", length=180, unique=true, nullable=true)
  35.      * @Assert\Email(message = "The email '{{ value }}' is not a valid email.")
  36.      */
  37.     private $email;
  38.     /**
  39.      * @ORM\Column(type="json")
  40.      */
  41.     private $roles = [];
  42.     /**
  43.      * @var string The hashed password
  44.      * @ORM\Column(type="string")
  45.      * @Assert\Length(min="8", minMessage="8 caracteres minimum")
  46.      */
  47.     private $password;
  48.     /**
  49.      * Undocumented variable
  50.      * @Assert\EqualTo(propertyPath="password", message="Mot de passe different")
  51.      * @var [type]
  52.      */
  53.     public $confirm_password;
  54.     /**
  55.      * @ORM\Column(type="string", length=255, nullable=true)
  56.      */
  57.     private $designation;
  58.     /**
  59.      * @ORM\Column(type="string", length=255, nullable=true, unique=true)
  60.      */
  61.     private $phone;
  62.     /**
  63.      * @ORM\Column(type="string", length=255, nullable=true)
  64.      */
  65.     private $phonetwo;
  66.     /**
  67.      * @ORM\Column(type="string", length=255, nullable=true)
  68.      */
  69.     private $phonethree;
  70.     /**
  71.      * @ORM\Column(type="text", nullable=true)
  72.      */
  73.     private $ordre;
  74.     /**
  75.      * @ORM\Column(type="boolean")
  76.      */
  77.     private $is_active false;
  78.     /**
  79.      * @ORM\Column(type="string", length=255, nullable=true)
  80.      */
  81.     private $firstname;
  82.     /**
  83.      * @ORM\Column(type="string", length=255, nullable=true)
  84.      */
  85.     private $lastname;
  86.     /**
  87.      * @ORM\Column(type="datetime", nullable=true)
  88.      */
  89.     private $is_acceptcgv;
  90.     /**
  91.      * @ORM\Column(type="string", length=255, nullable=true)
  92.      */
  93.     private $address;
  94.     /**
  95.      * @ORM\Column(type="string", length=255, nullable=true)
  96.      */
  97.     private $pays;
  98.     /**
  99.      * @ORM\OneToMany(targetEntity=Proposition::class, mappedBy="user")
  100.      */
  101.     private $propositions;
  102.     /**
  103.      * @ORM\ManyToOne(targetEntity=Speciality::class, inversedBy="users")
  104.      */
  105.     private $speciality;
  106.     /**
  107.      * @ORM\OneToMany(targetEntity=Order::class, mappedBy="user")
  108.      */
  109.     private $orders;
  110.     /**
  111.      * @ORM\ManyToOne(targetEntity=Ville::class, inversedBy="users")
  112.      * @ORM\JoinColumn(nullable=true)
  113.      */
  114.     private $ville;
  115.     /**
  116.      * @ORM\ManyToOne(targetEntity=Quartier::class, inversedBy="users")
  117.      * @ORM\JoinColumn(nullable=true)
  118.      */
  119.     private $quartier;
  120.     /**
  121.      * @ORM\OneToMany(targetEntity=GroupSuggestion::class, mappedBy="user")
  122.      */
  123.     private $groupSuggestions;
  124.     /**
  125.      * @ORM\OneToMany(targetEntity=Order::class, mappedBy="grossiste")
  126.      */
  127.     private $ordersGrossistes;
  128.     /**
  129.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="users")
  130.      */
  131.     private $grossiste;
  132.     /**
  133.      * @ORM\OneToMany(targetEntity=User::class, mappedBy="grossiste")
  134.      */
  135.     private $users;
  136.     /**
  137.      * @ORM\OneToMany(targetEntity=Cart::class, mappedBy="user")
  138.      */
  139.     private $carts;
  140.     /**
  141.      * @ORM\OneToMany(targetEntity=Stockpharmacie::class, mappedBy="user", orphanRemoval=true)
  142.      */
  143.     private $stockpharmacies;
  144.     /**
  145.      * @ORM\OneToMany(targetEntity=HistoriqueRefusProposition::class, mappedBy="pharmcie")
  146.      */
  147.     private $historiqueRefusPropositions;
  148.     /**
  149.      * @ORM\ManyToOne(targetEntity=Pays::class, inversedBy="users")
  150.      * @ORM\OrderBy({"name" = "ASC"})
  151.      */
  152.     private $payslocalisation;
  153.     /**
  154.      * @ORM\Column(type="string", length=255, nullable=true)
  155.      */
  156.     private $urlexcelcmd;
  157.     /**
  158.      * @ORM\Column(type="boolean", nullable=true)
  159.      */
  160.     private $isPaid;
  161.     /**
  162.      * @ORM\OneToMany(targetEntity=Discution::class, mappedBy="user")
  163.      */
  164.     private $discutions;
  165.     /**
  166.      * @ORM\OneToMany(targetEntity=Reclamation::class, mappedBy="user", orphanRemoval=true)
  167.      */
  168.     private $reclamations;
  169.     /**
  170.      * @ORM\Column(type="string", length=255, nullable=true)
  171.      */
  172.     private $image;
  173.     /**
  174.      * @Vich\UploadableField(mapping="user_image", fileNameProperty="image")
  175.      * @var File|null
  176.      * @Assert\Image(
  177.      * mimeTypes = {"image/jpeg", "image/gif", "image/png", "image/jpg"},
  178.      * )
  179.      */
  180.     private $imageFile;
  181.     /**
  182.      * @ORM\Column(type="datetime", nullable=true)
  183.      */
  184.     private $updatedAt;
  185.     /**
  186.      * @ORM\Column(type="string", length=255, nullable=true)
  187.      */
  188.     private $verificationCode;
  189.     /**
  190.      * @ORM\Column(type="integer", nullable=true)
  191.      */
  192.     private $verified;
  193.     /**
  194.      * @ORM\OneToMany(targetEntity=Forecast::class, mappedBy="user")
  195.      */
  196.     private $forecasts;
  197.     /**
  198.      * @ORM\OneToMany(targetEntity=UserTypepaiement::class, mappedBy="users")
  199.      */
  200.     private $userTypepaiements;
  201.     /**
  202.      * 
  203.      */
  204.     private $typepaiements;
  205.     /**
  206.      * @ORM\OneToMany(targetEntity=HistoriquePaiement::class, mappedBy="user")
  207.      */
  208.     private $historiquePaiements;
  209.     /**
  210.      * @ORM\OneToMany(targetEntity=Forecast::class, mappedBy="grossiste")
  211.      */
  212.     private $instances_forecasts;
  213.     /**
  214.      * @ORM\ManyToOne(targetEntity=IctusPharmacie::class, inversedBy="users", cascade={"persist"})
  215.      */
  216.     private $ictusPharmacie;
  217.     /**
  218.      * @ORM\OneToMany(targetEntity=IctusPanierPatient::class, mappedBy="user")
  219.      */
  220.     private $ictusPanierPatients;
  221.     /**
  222.      * @ORM\OneToMany(targetEntity=IctusCommande::class, mappedBy="user")
  223.      */
  224.     private $ictusCommandes;
  225.     /**
  226.      * @ORM\Column(type="float", nullable=true)
  227.      */
  228.     private $latitude;
  229.     /**
  230.      * @ORM\Column(type="float", nullable=true)
  231.      */
  232.     private $logitude;
  233.     /**
  234.      * @ORM\OneToMany(targetEntity=IctoRemboursement::class, mappedBy="payeur")
  235.      */
  236.     private $ictoRemboursements;
  237.     /**
  238.      * @ORM\Column(type="datetime", nullable=true)
  239.      */
  240.     private $cguaccepted;
  241.     /**
  242.      * @ORM\Column(type="boolean", nullable=true)
  243.      */
  244.     private $isAdmin;
  245.     /**
  246.      * @ORM\Column(type="string", length=255, nullable=true)
  247.      */
  248.     private $CIN;
  249.     /**
  250.      * @ORM\OneToMany(targetEntity=Ordonnance::class, mappedBy="propriertaire", orphanRemoval=true)
  251.      */
  252.     private $ordonnances;
  253.     /**
  254.      * @ORM\OneToMany(targetEntity=Adresse::class, mappedBy="patient")
  255.      */
  256.     private $adresses;
  257.     /**
  258.      * @ORM\ManyToOne(targetEntity=SocieteLivraison::class, inversedBy="users")
  259.      */
  260.     private $societeLivraison;
  261.     /**
  262.      * @ORM\Column(type="string", length=255, nullable=true)
  263.      */
  264.     private $reinitmdp;
  265.     /**
  266.      * @ORM\Column(type="string", length=255, nullable=true)
  267.      */
  268.     private $validate_code;
  269.     /**
  270.      * @ORM\Column(type="datetime", nullable=true)
  271.      */
  272.     private $expiredreinitmdp;
  273.     /**
  274.      * @ORM\OneToMany(targetEntity=IctusPanierSpecial::class, mappedBy="user", orphanRemoval=true)
  275.      */
  276.     private $ictusPanierSpecials;
  277.     /**
  278.      * @ORM\OneToMany(targetEntity=CommandeSpecial::class, mappedBy="grossiste")
  279.      */
  280.     private $commandeSpecials;
  281.     /**
  282.      * @ORM\OneToMany(targetEntity=CommandeSpecial::class, mappedBy="user")
  283.      */
  284.     private $commandeSpecialsIctus;
  285.     /**
  286.      * @ORM\OneToMany(targetEntity=NonDisponibilite::class, mappedBy="livreur")
  287.      */
  288.     private $nonDisponibilites;
  289.     /**
  290.      * @ORM\OneToMany(targetEntity=FacturePatient::class, mappedBy="User", orphanRemoval=true)
  291.      */
  292.     private $facturePatients;
  293.     /**
  294.      * @ORM\Column(type="string", length=255, nullable=true)
  295.      */
  296.     private $referenceClientTP;
  297.     /**
  298.      * @ORM\Column(type="string", length=255, nullable=true)
  299.      */
  300.     private $societename;
  301.     /**
  302.      * @ORM\Column(type="date", nullable=true)
  303.      */
  304.     private $datenaissance;
  305.     /**
  306.      * @ORM\Column(type="string", length=255, nullable=true)
  307.      */
  308.     private $fcm_token;
  309.     /**
  310.      * @ORM\OneToMany(targetEntity=IctusReclamation::class, mappedBy="user", orphanRemoval=true)
  311.      */
  312.     private $ictusReclamations;
  313.     /**
  314.      * @ORM\OneToMany(targetEntity=IctusMobileAppareil::class, mappedBy="user", orphanRemoval=true)
  315.      */
  316.     private $ictusMobileAppareils;
  317.     /* 
  318.      * @ORM\OneToMany(targetEntity=Livraison::class, mappedBy="livreur")
  319.      */
  320.     private $livraisons;
  321.     /**
  322.      * @ORM\OneToMany(targetEntity=Parcours::class, mappedBy="patient")
  323.      */
  324.     private $parcours;
  325.     /**
  326.      * @ORM\OneToMany(targetEntity=Photo::class, mappedBy="creator")
  327.      */
  328.     private $photoscreate;
  329.     /**
  330.      * @ORM\Column(type="integer", nullable=true)
  331.      */
  332.     private $rangphoto;
  333.     /**
  334.      * @ORM\Column(type="string", length=255, nullable=true)
  335.      */
  336.     private $serviceSopharmad;
  337.     /**
  338.      * @ORM\OneToMany(targetEntity=IctoMouvement::class, mappedBy="user")
  339.      */
  340.     private $ictoMouvements;
  341.     /**
  342.      * @ORM\OneToMany(targetEntity=Doublon::class, mappedBy="user")
  343.      */
  344.     private $doublons;
  345.     /**
  346.      * @ORM\OneToMany(targetEntity=Rate::class, mappedBy="user", orphanRemoval=true)
  347.      */
  348.     private $rates;
  349.     /**
  350.      * @ORM\OneToMany(targetEntity=SearchHistory::class, mappedBy="user")
  351.      */
  352.     private $searchHistories;
  353.     /**
  354.      * @ORM\ManyToOne(targetEntity=IctusTypeLivraison::class, inversedBy="users")
  355.      */
  356.     private $lastTypeLivraison;
  357.     /**
  358.      * @ORM\ManyToOne(targetEntity=IctusTypePaiement::class, inversedBy="users")
  359.      */
  360.     private $lastTypePaiement;
  361.     /**
  362.      * @ORM\OneToMany(targetEntity=RemiseUserPharmacie::class, mappedBy="user")
  363.      */
  364.     private $remiseUserPharmacies;
  365.     /**
  366.      * @ORM\Column(type="boolean", nullable=true)
  367.      */
  368.     private $isRemiseAuto;
  369.     /**
  370.      * @ORM\OneToMany(targetEntity=Parrainage::class, mappedBy="user", orphanRemoval=true)
  371.      */
  372.     private $parrainages;
  373.     /**
  374.      * @ORM\OneToMany(targetEntity=Favorite::class, mappedBy="user", orphanRemoval=true)
  375.      */
  376.     private $favorites;
  377.     /**
  378.      * @ORM\OneToMany(targetEntity=Carte::class, mappedBy="user", orphanRemoval=true)
  379.      */
  380.     private $cartes;
  381.     /**
  382.      * @ORM\OneToMany(targetEntity=CertCertificat::class, mappedBy="user", orphanRemoval=true)
  383.      */
  384.     private $certCertificats;
  385.     /**
  386.      * @ORM\Column(type="integer", nullable=true)
  387.      */
  388.     private $sexe;
  389.     /**
  390.      * @ORM\Column(type="string", length=255, nullable=true)
  391.      */
  392.     private $codeParrainageOther;
  393.     /**
  394.      * @ORM\Column(type="string", length=255, nullable=true)
  395.      */
  396.     private $codeParrainageMine;
  397.     /**
  398.      * @ORM\Column(type="string", length=255, nullable=true)
  399.      */
  400.     private $prefixNumber;
  401.     /**
  402.      * @ORM\Column(type="boolean", nullable=true)
  403.      */
  404.     private $isDisponible;
  405.     public function __construct()
  406.     {
  407.         $this->propositions                   = new ArrayCollection();
  408.         $this->orders                         = new ArrayCollection();
  409.         $this->groupSuggestions               = new ArrayCollection();
  410.         $this->ordersGrossistes               = new ArrayCollection();
  411.         $this->users                          = new ArrayCollection();
  412.         $this->carts                          = new ArrayCollection();
  413.         $this->stockpharmacies                = new ArrayCollection();
  414.         $this->historiqueRefusPropositions    = new ArrayCollection();
  415.         $this->discutions                     = new ArrayCollection();
  416.         $this->reclamations                   = new ArrayCollection();
  417.         $this->forecasts                      = new ArrayCollection();
  418.         $this->userTypepaiements              = new ArrayCollection();
  419.         $this->historiquePaiements            = new ArrayCollection();
  420.         $this->instances_forecasts            = new ArrayCollection();
  421.         $this->ictusPanierPatients            = new ArrayCollection();
  422.         $this->ictusCommandes                 = new ArrayCollection();
  423.         $this->ictoRemboursements             = new ArrayCollection();
  424.         $this->is_acceptcgv                   = new \DateTime();
  425.         $this->cguaccepted                    = new \DateTime();
  426.         $this->ordonnances = new ArrayCollection();
  427.         $this->adresses = new ArrayCollection();
  428.         $this->ictusPanierSpecials = new ArrayCollection();
  429.         $this->commandeSpecials = new ArrayCollection();
  430.         $this->commandeSpecialsIctus = new ArrayCollection();
  431.         $this->nonDisponibilites = new ArrayCollection();
  432.         $this->facturePatients = new ArrayCollection();
  433.         $this->ictusReclamations = new ArrayCollection();
  434.         $this->ictusMobileAppareils = new ArrayCollection();
  435.         $this->livraisons = new ArrayCollection();
  436.         $this->parcours = new ArrayCollection();
  437.         $this->photoscreate = new ArrayCollection();
  438.         $this->ictoMouvements = new ArrayCollection();
  439.         $this->doublons = new ArrayCollection();
  440.         $this->rates = new ArrayCollection();
  441.         $this->searchHistories = new ArrayCollection();
  442.         $this->remiseUserPharmacies = new ArrayCollection();
  443.         $this->parrainages = new ArrayCollection();
  444.         $this->favorites = new ArrayCollection();
  445.         $this->cartes = new ArrayCollection();
  446.         $this->certCertificats = new ArrayCollection();
  447.     }
  448.     public function getNomComplet()
  449.     {
  450.         return $this->firstname ' ' $this->lastname;
  451.     }
  452.     public function getId(): ?int
  453.     {
  454.         return $this->id;
  455.     }
  456.     public function getEmail(): ?string
  457.     {
  458.         return $this->email;
  459.     }
  460.     public function setEmail(?string $email): self
  461.     {
  462.         $this->email $email;
  463.         return $this;
  464.     }
  465.     /**
  466.      * A visual identifier that represents this user.
  467.      *
  468.      * @see UserInterface
  469.      */
  470.     public function getUserIdentifier(): ?string
  471.     {
  472.         return (string) $this->email;
  473.     }
  474.     /**
  475.      * @deprecated since Symfony 5.3, use getUserIdentifier instead
  476.      */
  477.     public function getUsername(): ?string
  478.     {
  479.         return (string) $this->email;
  480.     }
  481.     /**
  482.      * @see UserInterface
  483.      */
  484.     public function getRoles(): array
  485.     {
  486.         $roles $this->roles;
  487.         // guarantee every user at least has ROLE_USER
  488.         $roles[] = 'ROLE_USER';
  489.         return array_unique($roles);
  490.     }
  491.     public function setRoles(array $roles): self
  492.     {
  493.         $this->roles $roles;
  494.         return $this;
  495.     }
  496.     /**
  497.      * @see PasswordAuthenticatedUserInterface
  498.      */
  499.     public function getPassword(): string
  500.     {
  501.         return $this->password;
  502.     }
  503.     public function setPassword(string $password): self
  504.     {
  505.         $this->password $password;
  506.         return $this;
  507.     }
  508.     /**
  509.      * Returning a salt is only needed, if you are not using a modern
  510.      * hashing algorithm (e.g. bcrypt or sodium) in your security.yaml.
  511.      *
  512.      * @see UserInterface
  513.      */
  514.     public function getSalt(): ?string
  515.     {
  516.         return null;
  517.     }
  518.     /**
  519.      * @see UserInterface
  520.      */
  521.     public function eraseCredentials() {}
  522.     public function getDesignation(): ?string
  523.     {
  524.         return $this->designation;
  525.     }
  526.     public function setDesignation(?string $designation): self
  527.     {
  528.         $this->designation $designation;
  529.         return $this;
  530.     }
  531.     public function getPhone(): ?string
  532.     {
  533.         return $this->phone;
  534.     }
  535.     public function setPhone(?string $phone): self
  536.     {
  537.         $this->phone $phone;
  538.         return $this;
  539.     }
  540.     public function getPhonetwo(): ?string
  541.     {
  542.         return $this->phonetwo;
  543.     }
  544.     public function setPhonetwo(?string $phonetwo): self
  545.     {
  546.         $this->phonetwo $phonetwo;
  547.         return $this;
  548.     }
  549.     public function getPhonethree(): ?string
  550.     {
  551.         return $this->phonethree;
  552.     }
  553.     public function setPhonethree(?string $phonethree): self
  554.     {
  555.         $this->phonethree $phonethree;
  556.         return $this;
  557.     }
  558.     public function getOrdre(): ?string
  559.     {
  560.         return $this->ordre;
  561.     }
  562.     public function setOrdre(?string $ordre): self
  563.     {
  564.         $this->ordre $ordre;
  565.         return $this;
  566.     }
  567.     public function getIsActive(): ?bool
  568.     {
  569.         return $this->is_active;
  570.     }
  571.     public function setIsActive(bool $is_active): self
  572.     {
  573.         $this->is_active $is_active;
  574.         return $this;
  575.     }
  576.     public function getFirstname(): ?string
  577.     {
  578.         return $this->firstname;
  579.     }
  580.     public function setFirstname(?string $firstname): self
  581.     {
  582.         $this->firstname $firstname;
  583.         return $this;
  584.     }
  585.     public function getLastname(): ?string
  586.     {
  587.         return $this->lastname;
  588.     }
  589.     public function setLastname(?string $lastname): self
  590.     {
  591.         $this->lastname $lastname;
  592.         return $this;
  593.     }
  594.     public function getFullName()
  595.     {
  596.         return $this->firstname ' ' $this->lastname;
  597.     }
  598.     public function getIsAcceptcgv(): ?\DateTimeInterface
  599.     {
  600.         return $this->is_acceptcgv;
  601.     }
  602.     public function setIsAcceptcgv(?\DateTimeInterface $is_acceptcgv): self
  603.     {
  604.         $this->is_acceptcgv $is_acceptcgv;
  605.         return $this;
  606.     }
  607.     public function getAddress(): ?string
  608.     {
  609.         return $this->address;
  610.     }
  611.     public function getCompleteAddress()
  612.     {
  613.         return $this->address ', ' $this->getQuartier() . ', ' $this->getVille();
  614.     }
  615.     public function setAddress(?string $address): self
  616.     {
  617.         $this->address $address;
  618.         return $this;
  619.     }
  620.     public function getPays(): ?string
  621.     {
  622.         return $this->pays;
  623.     }
  624.     public function setPays(?string $pays): self
  625.     {
  626.         $this->pays $pays;
  627.         return $this;
  628.     }
  629.     /**
  630.      * @return Collection<int, Proposition>
  631.      */
  632.     public function getPropositions(): Collection
  633.     {
  634.         return $this->propositions;
  635.     }
  636.     public function addProposition(Proposition $proposition): self
  637.     {
  638.         if (!$this->propositions->contains($proposition)) {
  639.             $this->propositions[] = $proposition;
  640.             $proposition->setUser($this);
  641.         }
  642.         return $this;
  643.     }
  644.     public function removeProposition(Proposition $proposition): self
  645.     {
  646.         if ($this->propositions->removeElement($proposition)) {
  647.             // set the owning side to null (unless already changed)
  648.             if ($proposition->getUser() === $this) {
  649.                 $proposition->setUser(null);
  650.             }
  651.         }
  652.         return $this;
  653.     }
  654.     public function getSpeciality(): ?Speciality
  655.     {
  656.         return $this->speciality;
  657.     }
  658.     public function setSpeciality(?Speciality $speciality): self
  659.     {
  660.         $this->speciality $speciality;
  661.         return $this;
  662.     }
  663.     /**
  664.      * @return Collection<int, Order>
  665.      */
  666.     public function getOrders(): Collection
  667.     {
  668.         return $this->orders;
  669.     }
  670.     public function addOrder(Order $order): self
  671.     {
  672.         if (!$this->orders->contains($order)) {
  673.             $this->orders[] = $order;
  674.             $order->setUser($this);
  675.         }
  676.         return $this;
  677.     }
  678.     public function removeOrder(Order $order): self
  679.     {
  680.         if ($this->orders->removeElement($order)) {
  681.             // set the owning side to null (unless already changed)
  682.             if ($order->getUser() === $this) {
  683.                 $order->setUser(null);
  684.             }
  685.         }
  686.         return $this;
  687.     }
  688.     public function getVille(): ?Ville
  689.     {
  690.         return $this->ville;
  691.     }
  692.     public function setVille(?Ville $ville): self
  693.     {
  694.         $this->ville $ville;
  695.         return $this;
  696.     }
  697.     public function getQuartier(): ?Quartier
  698.     {
  699.         return $this->quartier;
  700.     }
  701.     public function setQuartier(?Quartier $quartier): self
  702.     {
  703.         $this->quartier $quartier;
  704.         return $this;
  705.     }
  706.     /**
  707.      * @return Collection<int, GroupSuggestion>
  708.      */
  709.     public function getGroupSuggestions(): Collection
  710.     {
  711.         return $this->groupSuggestions;
  712.     }
  713.     public function addGroupSuggestion(GroupSuggestion $groupSuggestion): self
  714.     {
  715.         if (!$this->groupSuggestions->contains($groupSuggestion)) {
  716.             $this->groupSuggestions[] = $groupSuggestion;
  717.             $groupSuggestion->setUser($this);
  718.         }
  719.         return $this;
  720.     }
  721.     public function removeGroupSuggestion(GroupSuggestion $groupSuggestion): self
  722.     {
  723.         if ($this->groupSuggestions->removeElement($groupSuggestion)) {
  724.             // set the owning side to null (unless already changed)
  725.             if ($groupSuggestion->getUser() === $this) {
  726.                 $groupSuggestion->setUser(null);
  727.             }
  728.         }
  729.         return $this;
  730.     }
  731.     /**
  732.      * @return Collection<int, Order>
  733.      */
  734.     public function getOrdersGrossistes(): Collection
  735.     {
  736.         return $this->ordersGrossistes;
  737.     }
  738.     public function addOrdersGrossiste(Order $ordersGrossiste): self
  739.     {
  740.         if (!$this->ordersGrossistes->contains($ordersGrossiste)) {
  741.             $this->ordersGrossistes[] = $ordersGrossiste;
  742.             $ordersGrossiste->setGrossiste($this);
  743.         }
  744.         return $this;
  745.     }
  746.     public function removeOrdersGrossiste(Order $ordersGrossiste): self
  747.     {
  748.         if ($this->ordersGrossistes->removeElement($ordersGrossiste)) {
  749.             // set the owning side to null (unless already changed)
  750.             if ($ordersGrossiste->getGrossiste() === $this) {
  751.                 $ordersGrossiste->setGrossiste(null);
  752.             }
  753.         }
  754.         return $this;
  755.     }
  756.     public function getGrossiste(): ?self
  757.     {
  758.         return $this->grossiste;
  759.     }
  760.     public function setGrossiste(?self $grossiste): self
  761.     {
  762.         $this->grossiste $grossiste;
  763.         return $this;
  764.     }
  765.     /**
  766.      * @return Collection<int, self>
  767.      */
  768.     public function getUsers(): Collection
  769.     {
  770.         return $this->users;
  771.     }
  772.     public function addUser(self $user): self
  773.     {
  774.         if (!$this->users->contains($user)) {
  775.             $this->users[] = $user;
  776.             $user->setGrossiste($this);
  777.         }
  778.         return $this;
  779.     }
  780.     public function removeUser(self $user): self
  781.     {
  782.         if ($this->users->removeElement($user)) {
  783.             // set the owning side to null (unless already changed)
  784.             if ($user->getGrossiste() === $this) {
  785.                 $user->setGrossiste(null);
  786.             }
  787.         }
  788.         return $this;
  789.     }
  790.     /**
  791.      * @return Collection<int, Cart>
  792.      */
  793.     public function getCarts(): Collection
  794.     {
  795.         return $this->carts;
  796.     }
  797.     public function addCart(Cart $cart): self
  798.     {
  799.         if (!$this->carts->contains($cart)) {
  800.             $this->carts[] = $cart;
  801.             $cart->setUser($this);
  802.         }
  803.         return $this;
  804.     }
  805.     public function removeCart(Cart $cart): self
  806.     {
  807.         if ($this->carts->removeElement($cart)) {
  808.             // set the owning side to null (unless already changed)
  809.             if ($cart->getUser() === $this) {
  810.                 $cart->setUser(null);
  811.             }
  812.         }
  813.         return $this;
  814.     }
  815.     /**
  816.      * @return Collection<int, Stockpharmacie>
  817.      */
  818.     public function getStockpharmacies(): Collection
  819.     {
  820.         return $this->stockpharmacies;
  821.     }
  822.     public function addStockpharmacy(Stockpharmacie $stockpharmacy): self
  823.     {
  824.         if (!$this->stockpharmacies->contains($stockpharmacy)) {
  825.             $this->stockpharmacies[] = $stockpharmacy;
  826.             $stockpharmacy->setUser($this);
  827.         }
  828.         return $this;
  829.     }
  830.     public function removeStockpharmacy(Stockpharmacie $stockpharmacy): self
  831.     {
  832.         if ($this->stockpharmacies->removeElement($stockpharmacy)) {
  833.             // set the owning side to null (unless already changed)
  834.             if ($stockpharmacy->getUser() === $this) {
  835.                 $stockpharmacy->setUser(null);
  836.             }
  837.         }
  838.         return $this;
  839.     }
  840.     /**
  841.      * @return Collection<int, HistoriqueRefusProposition>
  842.      */
  843.     public function getHistoriqueRefusPropositions(): Collection
  844.     {
  845.         return $this->historiqueRefusPropositions;
  846.     }
  847.     public function addHistoriqueRefusProposition(HistoriqueRefusProposition $historiqueRefusProposition): self
  848.     {
  849.         if (!$this->historiqueRefusPropositions->contains($historiqueRefusProposition)) {
  850.             $this->historiqueRefusPropositions[] = $historiqueRefusProposition;
  851.             $historiqueRefusProposition->setPharmcie($this);
  852.         }
  853.         return $this;
  854.     }
  855.     public function removeHistoriqueRefusProposition(HistoriqueRefusProposition $historiqueRefusProposition): self
  856.     {
  857.         if ($this->historiqueRefusPropositions->removeElement($historiqueRefusProposition)) {
  858.             // set the owning side to null (unless already changed)
  859.             if ($historiqueRefusProposition->getPharmcie() === $this) {
  860.                 $historiqueRefusProposition->setPharmcie(null);
  861.             }
  862.         }
  863.         return $this;
  864.     }
  865.     public function getPayslocalisation(): ?Pays
  866.     {
  867.         return $this->payslocalisation;
  868.     }
  869.     public function setPayslocalisation(?Pays $payslocalisation): self
  870.     {
  871.         $this->payslocalisation $payslocalisation;
  872.         return $this;
  873.     }
  874.     public function getUrlexcelcmd(): ?string
  875.     {
  876.         return $this->urlexcelcmd;
  877.     }
  878.     public function setUrlexcelcmd(?string $urlexcelcmd): self
  879.     {
  880.         $this->urlexcelcmd $urlexcelcmd;
  881.         return $this;
  882.     }
  883.     public function getIsPaid(): ?bool
  884.     {
  885.         return $this->isPaid;
  886.     }
  887.     public function setIsPaid(?bool $isPaid): self
  888.     {
  889.         $this->isPaid $isPaid;
  890.         return $this;
  891.     }
  892.     /**
  893.      * @return Collection<int, Discution>
  894.      */
  895.     public function getDiscutions(): Collection
  896.     {
  897.         return $this->discutions;
  898.     }
  899.     public function addDiscution(Discution $discution): self
  900.     {
  901.         if (!$this->discutions->contains($discution)) {
  902.             $this->discutions[] = $discution;
  903.             $discution->setUser($this);
  904.         }
  905.         return $this;
  906.     }
  907.     public function removeDiscution(Discution $discution): self
  908.     {
  909.         if ($this->discutions->removeElement($discution)) {
  910.             // set the owning side to null (unless already changed)
  911.             if ($discution->getUser() === $this) {
  912.                 $discution->setUser(null);
  913.             }
  914.         }
  915.         return $this;
  916.     }
  917.     /**
  918.      * @return Collection<int, Reclamation>
  919.      */
  920.     public function getReclamations(): Collection
  921.     {
  922.         return $this->reclamations;
  923.     }
  924.     public function addReclamation(Reclamation $reclamation): self
  925.     {
  926.         if (!$this->reclamations->contains($reclamation)) {
  927.             $this->reclamations[] = $reclamation;
  928.             $reclamation->setUser($this);
  929.         }
  930.         return $this;
  931.     }
  932.     public function removeReclamation(Reclamation $reclamation): self
  933.     {
  934.         if ($this->reclamations->removeElement($reclamation)) {
  935.             // set the owning side to null (unless already changed)
  936.             if ($reclamation->getUser() === $this) {
  937.                 $reclamation->setUser(null);
  938.             }
  939.         }
  940.         return $this;
  941.     }
  942.     public function getImage(): ?string
  943.     {
  944.         return $this->image;
  945.     }
  946.     public function setImage(?string $image): self
  947.     {
  948.         $this->image $image;
  949.         return $this;
  950.     }
  951.     public function getUpdatedAt(): ?\DateTimeInterface
  952.     {
  953.         return $this->updatedAt;
  954.     }
  955.     public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
  956.     {
  957.         $this->updatedAt $updatedAt;
  958.         return $this;
  959.     }
  960.     //pour l'upload image
  961.     public function setImageFile(?File $imageFile null): User
  962.     {
  963.         $this->imageFile $imageFile;
  964.         if ($imageFile instanceof UploadedFile) {
  965.             $this->updatedAt = new \DateTime('now');
  966.         }
  967.         return $this;
  968.     }
  969.     public function getImageFile(): ?File
  970.     {
  971.         return $this->imageFile;
  972.     }
  973.     public function serialize()
  974.     {
  975.         return serialize(array(
  976.             $this->id,
  977.             $this->email,
  978.             $this->password,
  979.         ));
  980.     }
  981.     public function unserialize($serialized)
  982.     {
  983.         list(
  984.             $this->id,
  985.             $this->email,
  986.             $this->password,
  987.         ) = unserialize($serialized);
  988.     }
  989.     public function getVerificationCode(): ?string
  990.     {
  991.         return $this->verificationCode;
  992.     }
  993.     public function setVerificationCode(?string $verificationCode): self
  994.     {
  995.         $this->verificationCode $verificationCode;
  996.         return $this;
  997.     }
  998.     public function getVerified(): ?int
  999.     {
  1000.         return $this->verified;
  1001.     }
  1002.     public function setVerified(?int $verified): self
  1003.     {
  1004.         $this->verified $verified;
  1005.         return $this;
  1006.     }
  1007.     /**
  1008.      * @return Collection<int, Forecast>
  1009.      */
  1010.     public function getForecasts(): Collection
  1011.     {
  1012.         return $this->forecasts;
  1013.     }
  1014.     public function addForecast(Forecast $forecast): self
  1015.     {
  1016.         if (!$this->forecasts->contains($forecast)) {
  1017.             $this->forecasts[] = $forecast;
  1018.             $forecast->setUser($this);
  1019.         }
  1020.         return $this;
  1021.     }
  1022.     public function removeForecast(Forecast $forecast): self
  1023.     {
  1024.         if ($this->forecasts->removeElement($forecast)) {
  1025.             // set the owning side to null (unless already changed)
  1026.             if ($forecast->getUser() === $this) {
  1027.                 $forecast->setUser(null);
  1028.             }
  1029.         }
  1030.         return $this;
  1031.     }
  1032.     /**
  1033.      * @return Collection<int, UserTypepaiement>
  1034.      */
  1035.     public function getUserTypepaiements(): Collection
  1036.     {
  1037.         return $this->userTypepaiements;
  1038.     }
  1039.     public function addUserTypepaiement(UserTypepaiement $userTypepaiement): self
  1040.     {
  1041.         if (!$this->userTypepaiements->contains($userTypepaiement)) {
  1042.             $this->userTypepaiements[] = $userTypepaiement;
  1043.             $userTypepaiement->setUsers($this);
  1044.         }
  1045.         return $this;
  1046.     }
  1047.     public function removeUserTypepaiement(UserTypepaiement $userTypepaiement): self
  1048.     {
  1049.         if ($this->userTypepaiements->removeElement($userTypepaiement)) {
  1050.             // set the owning side to null (unless already changed)
  1051.             if ($userTypepaiement->getUsers() === $this) {
  1052.                 $userTypepaiement->setUsers(null);
  1053.             }
  1054.         }
  1055.         return $this;
  1056.     }
  1057.     public function getTypepaiements(): ?Typepaiement
  1058.     {
  1059.         return $this->typepaiements;
  1060.     }
  1061.     public function setTypepaiements(?Typepaiement $typepaiements): self
  1062.     {
  1063.         $this->typepaiements $typepaiements;
  1064.         return $this;
  1065.     }
  1066.     /**
  1067.      * @return Collection<int, HistoriquePaiement>
  1068.      */
  1069.     public function getHistoriquePaiements(): Collection
  1070.     {
  1071.         return $this->historiquePaiements;
  1072.     }
  1073.     public function addHistoriquePaiement(HistoriquePaiement $historiquePaiement): self
  1074.     {
  1075.         if (!$this->historiquePaiements->contains($historiquePaiement)) {
  1076.             $this->historiquePaiements[] = $historiquePaiement;
  1077.             $historiquePaiement->setUser($this);
  1078.         }
  1079.         return $this;
  1080.     }
  1081.     public function removeHistoriquePaiement(HistoriquePaiement $historiquePaiement): self
  1082.     {
  1083.         if ($this->historiquePaiements->removeElement($historiquePaiement)) {
  1084.             // set the owning side to null (unless already changed)
  1085.             if ($historiquePaiement->getUser() === $this) {
  1086.                 $historiquePaiement->setUser(null);
  1087.             }
  1088.         }
  1089.         return $this;
  1090.     }
  1091.     /**
  1092.      * @return Collection<int, Forecast>
  1093.      */
  1094.     public function getInstancesForecasts(): Collection
  1095.     {
  1096.         return $this->instances_forecasts;
  1097.     }
  1098.     public function addInstancesForecast(Forecast $instancesForecast): self
  1099.     {
  1100.         if (!$this->instances_forecasts->contains($instancesForecast)) {
  1101.             $this->instances_forecasts[] = $instancesForecast;
  1102.             $instancesForecast->setGrossiste($this);
  1103.         }
  1104.         return $this;
  1105.     }
  1106.     public function removeInstancesForecast(Forecast $instancesForecast): self
  1107.     {
  1108.         if ($this->instances_forecasts->removeElement($instancesForecast)) {
  1109.             // set the owning side to null (unless already changed)
  1110.             if ($instancesForecast->getGrossiste() === $this) {
  1111.                 $instancesForecast->setGrossiste(null);
  1112.             }
  1113.         }
  1114.         return $this;
  1115.     }
  1116.     public function getIctusPharmacie(): ?IctusPharmacie
  1117.     {
  1118.         return $this->ictusPharmacie;
  1119.     }
  1120.     public function setIctusPharmacie(?IctusPharmacie $ictusPharmacie): self
  1121.     {
  1122.         $this->ictusPharmacie $ictusPharmacie;
  1123.         return $this;
  1124.     }
  1125.     /**
  1126.      * @return Collection<int, IctusPanierPatient>
  1127.      */
  1128.     public function getIctusPanierPatients(): Collection
  1129.     {
  1130.         return $this->ictusPanierPatients;
  1131.     }
  1132.     public function addIctusPanierPatient(IctusPanierPatient $ictusPanierPatient): self
  1133.     {
  1134.         if (!$this->ictusPanierPatients->contains($ictusPanierPatient)) {
  1135.             $this->ictusPanierPatients[] = $ictusPanierPatient;
  1136.             $ictusPanierPatient->setUser($this);
  1137.         }
  1138.         return $this;
  1139.     }
  1140.     public function removeIctusPanierPatient(IctusPanierPatient $ictusPanierPatient): self
  1141.     {
  1142.         if ($this->ictusPanierPatients->removeElement($ictusPanierPatient)) {
  1143.             // set the owning side to null (unless already changed)
  1144.             if ($ictusPanierPatient->getUser() === $this) {
  1145.                 $ictusPanierPatient->setUser(null);
  1146.             }
  1147.         }
  1148.         return $this;
  1149.     }
  1150.     /**
  1151.      * @return Collection<int, IctusCommande>
  1152.      */
  1153.     public function getIctusCommandes(): Collection
  1154.     {
  1155.         return $this->ictusCommandes;
  1156.     }
  1157.     public function addIctusCommande(IctusCommande $ictusCommande): self
  1158.     {
  1159.         if (!$this->ictusCommandes->contains($ictusCommande)) {
  1160.             $this->ictusCommandes[] = $ictusCommande;
  1161.             $ictusCommande->setUser($this);
  1162.         }
  1163.         return $this;
  1164.     }
  1165.     public function removeIctusCommande(IctusCommande $ictusCommande): self
  1166.     {
  1167.         if ($this->ictusCommandes->removeElement($ictusCommande)) {
  1168.             // set the owning side to null (unless already changed)
  1169.             if ($ictusCommande->getUser() === $this) {
  1170.                 $ictusCommande->setUser(null);
  1171.             }
  1172.         }
  1173.         return $this;
  1174.     }
  1175.     public function getLatitude(): ?float
  1176.     {
  1177.         return $this->latitude;
  1178.     }
  1179.     public function setLatitude(?float $latitude): self
  1180.     {
  1181.         $this->latitude $latitude;
  1182.         return $this;
  1183.     }
  1184.     public function getLogitude(): ?float
  1185.     {
  1186.         return $this->logitude;
  1187.     }
  1188.     public function setLogitude(?float $logitude): self
  1189.     {
  1190.         $this->logitude $logitude;
  1191.         return $this;
  1192.     }
  1193.     /**
  1194.      * @return Collection<int, IctoRemboursement>
  1195.      */
  1196.     public function getIctoRemboursements(): Collection
  1197.     {
  1198.         return $this->ictoRemboursements;
  1199.     }
  1200.     public function addIctoRemboursement(IctoRemboursement $ictoRemboursement): self
  1201.     {
  1202.         if (!$this->ictoRemboursements->contains($ictoRemboursement)) {
  1203.             $this->ictoRemboursements[] = $ictoRemboursement;
  1204.             $ictoRemboursement->setPayeur($this);
  1205.         }
  1206.         return $this;
  1207.     }
  1208.     public function removeIctoRemboursement(IctoRemboursement $ictoRemboursement): self
  1209.     {
  1210.         if ($this->ictoRemboursements->removeElement($ictoRemboursement)) {
  1211.             // set the owning side to null (unless already changed)
  1212.             if ($ictoRemboursement->getPayeur() === $this) {
  1213.                 $ictoRemboursement->setPayeur(null);
  1214.             }
  1215.         }
  1216.         return $this;
  1217.     }
  1218.     public function isCguaccepted(): ?\DateTimeInterface
  1219.     {
  1220.         return $this->cguaccepted;
  1221.     }
  1222.     public function setCguaccepted(?\DateTimeInterface $cguaccepted): self
  1223.     {
  1224.         $this->cguaccepted $cguaccepted;
  1225.         return $this;
  1226.     }
  1227.     public function isIsAdmin(): ?bool
  1228.     {
  1229.         return $this->isAdmin;
  1230.     }
  1231.     public function setIsAdmin(?bool $isAdmin): self
  1232.     {
  1233.         $this->isAdmin $isAdmin;
  1234.         return $this;
  1235.     }
  1236.     public function getCIN(): ?string
  1237.     {
  1238.         return $this->CIN;
  1239.     }
  1240.     public function setCIN(?string $CIN): self
  1241.     {
  1242.         $this->CIN $CIN;
  1243.         return $this;
  1244.     }
  1245.     /**
  1246.      * @return Collection<int, Ordonnance>
  1247.      */
  1248.     public function getOrdonnances(): Collection
  1249.     {
  1250.         return $this->ordonnances;
  1251.     }
  1252.     public function addOrdonnance(Ordonnance $ordonnance): self
  1253.     {
  1254.         if (!$this->ordonnances->contains($ordonnance)) {
  1255.             $this->ordonnances[] = $ordonnance;
  1256.             $ordonnance->setPropriertaire($this);
  1257.         }
  1258.         return $this;
  1259.     }
  1260.     public function removeOrdonnance(Ordonnance $ordonnance): self
  1261.     {
  1262.         if ($this->ordonnances->removeElement($ordonnance)) {
  1263.             // set the owning side to null (unless already changed)
  1264.             if ($ordonnance->getPropriertaire() === $this) {
  1265.                 $ordonnance->setPropriertaire(null);
  1266.             }
  1267.         }
  1268.         return $this;
  1269.     }
  1270.     /**
  1271.      * @return Collection<int, Adresse>
  1272.      */
  1273.     public function getAdresses(): Collection
  1274.     {
  1275.         return $this->adresses;
  1276.     }
  1277.     public function addAdress(Adresse $adress): self
  1278.     {
  1279.         if (!$this->adresses->contains($adress)) {
  1280.             $this->adresses[] = $adress;
  1281.             $adress->setPatient($this);
  1282.         }
  1283.         return $this;
  1284.     }
  1285.     public function removeAdress(Adresse $adress): self
  1286.     {
  1287.         if ($this->adresses->removeElement($adress)) {
  1288.             // set the owning side to null (unless already changed)
  1289.             if ($adress->getPatient() === $this) {
  1290.                 $adress->setPatient(null);
  1291.             }
  1292.         }
  1293.         return $this;
  1294.     }
  1295.     public function getSocieteLivraison(): ?SocieteLivraison
  1296.     {
  1297.         return $this->societeLivraison;
  1298.     }
  1299.     public function setSocieteLivraison(?SocieteLivraison $societeLivraison): self
  1300.     {
  1301.         $this->societeLivraison $societeLivraison;
  1302.     }
  1303.     /**
  1304.      * @return Collection<int, IctusPanierSpecial>
  1305.      */
  1306.     public function getIctusPanierSpecials(): Collection
  1307.     {
  1308.         return $this->ictusPanierSpecials;
  1309.     }
  1310.     public function addIctusPanierSpecial(IctusPanierSpecial $ictusPanierSpecial): self
  1311.     {
  1312.         if (!$this->ictusPanierSpecials->contains($ictusPanierSpecial)) {
  1313.             $this->ictusPanierSpecials[] = $ictusPanierSpecial;
  1314.             $ictusPanierSpecial->setUser($this);
  1315.         }
  1316.         return $this;
  1317.     }
  1318.     public function getReinitmdp(): ?string
  1319.     {
  1320.         return $this->reinitmdp;
  1321.     }
  1322.     public function setReinitmdp(?string $reinitmdp): self
  1323.     {
  1324.         $this->reinitmdp $reinitmdp;
  1325.         return $this;
  1326.     }
  1327.     public function getValidateCode(): ?string
  1328.     {
  1329.         return $this->validate_code;
  1330.     }
  1331.     public function setValidateCode(?string $validate_code): self
  1332.     {
  1333.         $this->validate_code $validate_code;
  1334.         return $this;
  1335.     }
  1336.     public function removeIctusPanierSpecial(IctusPanierSpecial $ictusPanierSpecial): self
  1337.     {
  1338.         if ($this->ictusPanierSpecials->removeElement($ictusPanierSpecial)) {
  1339.             // set the owning side to null (unless already changed)
  1340.             if ($ictusPanierSpecial->getUser() === $this) {
  1341.                 $ictusPanierSpecial->setUser(null);
  1342.             }
  1343.         }
  1344.         return $this;
  1345.     }
  1346.     /**
  1347.      * @return Collection<int, CommandeSpecial>
  1348.      */
  1349.     public function getCommandeSpecials(): Collection
  1350.     {
  1351.         return $this->commandeSpecials;
  1352.     }
  1353.     public function addCommandeSpecial(CommandeSpecial $commandeSpecial): self
  1354.     {
  1355.         if (!$this->commandeSpecials->contains($commandeSpecial)) {
  1356.             $this->commandeSpecials[] = $commandeSpecial;
  1357.             $commandeSpecial->setGrossiste($this);
  1358.         }
  1359.         return $this;
  1360.     }
  1361.     public function removeCommandeSpecial(CommandeSpecial $commandeSpecial): self
  1362.     {
  1363.         if ($this->commandeSpecials->removeElement($commandeSpecial)) {
  1364.             // set the owning side to null (unless already changed)
  1365.             if ($commandeSpecial->getGrossiste() === $this) {
  1366.                 $commandeSpecial->setGrossiste(null);
  1367.             }
  1368.         }
  1369.         return $this;
  1370.     }
  1371.     public function getExpiredreinitmdp(): ?\DateTimeInterface
  1372.     {
  1373.         return $this->expiredreinitmdp;
  1374.     }
  1375.     public function setExpiredreinitmdp(?\DateTimeInterface $expiredreinitmdp): self
  1376.     {
  1377.         $this->expiredreinitmdp $expiredreinitmdp;
  1378.         return $this;
  1379.     }
  1380.     /**
  1381.      * @return Collection<int, CommandeSpecial>
  1382.      */
  1383.     public function getCommandeSpecialsIctus(): Collection
  1384.     {
  1385.         return $this->commandeSpecialsIctus;
  1386.     }
  1387.     public function addCommandeSpecialsIctu(CommandeSpecial $commandeSpecialsIctu): self
  1388.     {
  1389.         if (!$this->commandeSpecialsIctus->contains($commandeSpecialsIctu)) {
  1390.             $this->commandeSpecialsIctus[] = $commandeSpecialsIctu;
  1391.             $commandeSpecialsIctu->setUser($this);
  1392.         }
  1393.         return $this;
  1394.     }
  1395.     public function removeCommandeSpecialsIctu(CommandeSpecial $commandeSpecialsIctu): self
  1396.     {
  1397.         if ($this->commandeSpecialsIctus->removeElement($commandeSpecialsIctu)) {
  1398.             // set the owning side to null (unless already changed)
  1399.             if ($commandeSpecialsIctu->getUser() === $this) {
  1400.                 $commandeSpecialsIctu->setUser(null);
  1401.             }
  1402.         }
  1403.         return $this;
  1404.     }
  1405.     /**
  1406.      * @return Collection<int, NonDisponibilite>
  1407.      */
  1408.     public function getNonDisponibilites(): Collection
  1409.     {
  1410.         return $this->nonDisponibilites;
  1411.     }
  1412.     public function addNonDisponibilite(NonDisponibilite $nonDisponibilite): self
  1413.     {
  1414.         if (!$this->nonDisponibilites->contains($nonDisponibilite)) {
  1415.             $this->nonDisponibilites[] = $nonDisponibilite;
  1416.             $nonDisponibilite->setLivreur($this);
  1417.         }
  1418.     }
  1419.     /**
  1420.      * @return Collection<int, FacturePatient>
  1421.      */
  1422.     public function getFacturePatients(): Collection
  1423.     {
  1424.         return $this->facturePatients;
  1425.     }
  1426.     public function addFacturePatient(FacturePatient $facturePatient): self
  1427.     {
  1428.         if (!$this->facturePatients->contains($facturePatient)) {
  1429.             $this->facturePatients[] = $facturePatient;
  1430.             $facturePatient->setUser($this);
  1431.         }
  1432.         return $this;
  1433.     }
  1434.     public function removeNonDisponibilite(NonDisponibilite $nonDisponibilite): self
  1435.     {
  1436.         if ($this->nonDisponibilites->removeElement($nonDisponibilite)) {
  1437.             // set the owning side to null (unless already changed)
  1438.             if ($nonDisponibilite->getLivreur() === $this) {
  1439.                 $nonDisponibilite->setLivreur(null);
  1440.             }
  1441.         }
  1442.     }
  1443.     public function removeFacturePatient(FacturePatient $facturePatient): self
  1444.     {
  1445.         if ($this->facturePatients->removeElement($facturePatient)) {
  1446.             // set the owning side to null (unless already changed)
  1447.             if ($facturePatient->getUser() === $this) {
  1448.                 $facturePatient->setUser(null);
  1449.             }
  1450.         }
  1451.         return $this;
  1452.     }
  1453.     public  function getPanierTotal()
  1454.     {
  1455.         $total 0;
  1456.         foreach ($this->getIctusPanierPatients() as $panier) {
  1457.             $total += $panier->getTotal();
  1458.         }
  1459.         return (int)$total;
  1460.     }
  1461.     public function getReferenceClientTP(): ?string
  1462.     {
  1463.         return $this->referenceClientTP;
  1464.     }
  1465.     public function setReferenceClientTP(?string $referenceClientTP): self
  1466.     {
  1467.         $this->referenceClientTP $referenceClientTP;
  1468.         return $this;
  1469.     }
  1470.     public function getSocietename(): ?string
  1471.     {
  1472.         return $this->societename;
  1473.     }
  1474.     public function setSocietename(?string $societename): self
  1475.     {
  1476.         $this->societename $societename;
  1477.         return $this;
  1478.     }
  1479.     public function getDatenaissance(): ?\DateTimeInterface
  1480.     {
  1481.         return $this->datenaissance;
  1482.     }
  1483.     public function setDatenaissance(?\DateTimeInterface $datenaissance): self
  1484.     {
  1485.         $this->datenaissance $datenaissance;
  1486.         return $this;
  1487.     }
  1488.     /**
  1489.      * @return Collection<int, Livraison>
  1490.      */
  1491.     public function getLivraisons(): Collection
  1492.     {
  1493.         return $this->livraisons;
  1494.     }
  1495.     public function addLivraison(Livraison $livraison): self
  1496.     {
  1497.         if (!$this->livraisons->contains($livraison)) {
  1498.             $this->livraisons[] = $livraison;
  1499.             $livraison->setLivreur($this);
  1500.         }
  1501.         return $this;
  1502.     }
  1503.     public function removeLivraison(Livraison $livraison): self
  1504.     {
  1505.         if ($this->livraisons->removeElement($livraison)) {
  1506.             // set the owning side to null (unless already changed)
  1507.             if ($livraison->getLivreur() === $this) {
  1508.                 $livraison->setLivreur(null);
  1509.             }
  1510.         }
  1511.         return $this;
  1512.     }
  1513.     /**
  1514.      * @return Collection<int, IctusMobileAppareil>
  1515.      */
  1516.     public function getIctusMobileAppareils(): Collection
  1517.     {
  1518.         return $this->ictusMobileAppareils;
  1519.     }
  1520.     public function addIctusMobileAppareil(IctusMobileAppareil $ictusMobileAppareil): self
  1521.     {
  1522.         if (!$this->ictusMobileAppareils->contains($ictusMobileAppareil)) {
  1523.             $this->ictusMobileAppareils[] = $ictusMobileAppareil;
  1524.             $ictusMobileAppareil->setUser($this);
  1525.         }
  1526.         return $this;
  1527.     }
  1528.     public function removeIctusMobileAppareil(IctusMobileAppareil $ictusMobileAppareil): self
  1529.     {
  1530.         if ($this->ictusMobileAppareils->removeElement($ictusMobileAppareil)) {
  1531.             // set the owning side to null (unless already changed)
  1532.             if ($ictusMobileAppareil->getUser() === $this) {
  1533.                 $ictusMobileAppareil->setUser(null);
  1534.             }
  1535.         }
  1536.         return $this;
  1537.     }
  1538.     /**
  1539.      * @return Collection<int, Photo>
  1540.      */
  1541.     public function getPhotoscreate(): Collection
  1542.     {
  1543.         return $this->photoscreate;
  1544.     }
  1545.     public function addPhotoscreate(Photo $photoscreate): self
  1546.     {
  1547.         if (!$this->photoscreate->contains($photoscreate)) {
  1548.             $this->photoscreate[] = $photoscreate;
  1549.             $photoscreate->setCreator($this);
  1550.         }
  1551.         return $this;
  1552.     }
  1553.     public function removePhotoscreate(Photo $photoscreate): self
  1554.     {
  1555.         if ($this->photoscreate->removeElement($photoscreate)) {
  1556.             // set the owning side to null (unless already changed)
  1557.             if ($photoscreate->getCreator() === $this) {
  1558.                 $photoscreate->setCreator(null);
  1559.             }
  1560.         }
  1561.         return $this;
  1562.     }
  1563.     public function getRangphoto(): ?int
  1564.     {
  1565.         return $this->rangphoto;
  1566.     }
  1567.     public function setRangphoto(?int $rangphoto): self
  1568.     {
  1569.         $this->rangphoto $rangphoto;
  1570.         return $this;
  1571.     }
  1572.     public function getServiceSopharmad(): ?string
  1573.     {
  1574.         return $this->serviceSopharmad;
  1575.     }
  1576.     public function setServiceSopharmad(?string $serviceSopharmad): self
  1577.     {
  1578.         $this->serviceSopharmad $serviceSopharmad;
  1579.         return $this;
  1580.     }
  1581.     /**
  1582.      * @return Collection<int, IctoMouvement>
  1583.      */
  1584.     public function getIctoMouvements(): Collection
  1585.     {
  1586.         return $this->ictoMouvements;
  1587.     }
  1588.     public function addIctoMouvement(IctoMouvement $ictoMouvement): self
  1589.     {
  1590.         if (!$this->ictoMouvements->contains($ictoMouvement)) {
  1591.             $this->ictoMouvements[] = $ictoMouvement;
  1592.             $ictoMouvement->setUser($this);
  1593.         }
  1594.         return $this;
  1595.     }
  1596.     public function removeIctoMouvement(IctoMouvement $ictoMouvement): self
  1597.     {
  1598.         if ($this->ictoMouvements->removeElement($ictoMouvement)) {
  1599.             // set the owning side to null (unless already changed)
  1600.             if ($ictoMouvement->getUser() === $this) {
  1601.                 $ictoMouvement->setUser(null);
  1602.             }
  1603.         }
  1604.         return $this;
  1605.     }
  1606.     /**
  1607.      * @return Collection<int, Doublon>
  1608.      */
  1609.     public function getDoublons(): Collection
  1610.     {
  1611.         return $this->doublons;
  1612.     }
  1613.     public function addDoublon(Doublon $doublon): self
  1614.     {
  1615.         if (!$this->doublons->contains($doublon)) {
  1616.             $this->doublons[] = $doublon;
  1617.             $doublon->setUser($this);
  1618.         }
  1619.         return $this;
  1620.     }
  1621.     public function removeDoublon(Doublon $doublon): self
  1622.     {
  1623.         if ($this->doublons->removeElement($doublon)) {
  1624.             // set the owning side to null (unless already changed)
  1625.             if ($doublon->getUser() === $this) {
  1626.                 $doublon->setUser(null);
  1627.             }
  1628.         }
  1629.         return $this;
  1630.     }
  1631.     /**
  1632.      * @return Collection<int, Rate>
  1633.      */
  1634.     public function getRates(): Collection
  1635.     {
  1636.         return $this->rates;
  1637.     }
  1638.     public function addRate(Rate $rate): self
  1639.     {
  1640.         if (!$this->rates->contains($rate)) {
  1641.             $this->rates[] = $rate;
  1642.             $rate->setUser($this);
  1643.         }
  1644.         return $this;
  1645.     }
  1646.     public function removeRate(Rate $rate): self
  1647.     {
  1648.         if ($this->rates->removeElement($rate)) {
  1649.             // set the owning side to null (unless already changed)
  1650.             if ($rate->getUser() === $this) {
  1651.                 $rate->setUser(null);
  1652.             }
  1653.         }
  1654.         return $this;
  1655.     }
  1656.     /**
  1657.      * @return Collection<int, SearchHistory>
  1658.      */
  1659.     public function getSearchHistories(): Collection
  1660.     {
  1661.         return $this->searchHistories;
  1662.     }
  1663.     public function addSearchHistory(SearchHistory $searchHistory): self
  1664.     {
  1665.         if (!$this->searchHistories->contains($searchHistory)) {
  1666.             $this->searchHistories[] = $searchHistory;
  1667.             $searchHistory->setUser($this);
  1668.         }
  1669.         return $this;
  1670.     }
  1671.     public function removeSearchHistory(SearchHistory $searchHistory): self
  1672.     {
  1673.         if ($this->searchHistories->removeElement($searchHistory)) {
  1674.             // set the owning side to null (unless already changed)
  1675.             if ($searchHistory->getUser() === $this) {
  1676.                 $searchHistory->setUser(null);
  1677.             }
  1678.         }
  1679.         return $this;
  1680.     }
  1681.     public function getLastTypeLivraison(): ?IctusTypeLivraison
  1682.     {
  1683.         return $this->lastTypeLivraison;
  1684.     }
  1685.     public function setLastTypeLivraison(?IctusTypeLivraison $lastTypeLivraison): self
  1686.     {
  1687.         $this->lastTypeLivraison $lastTypeLivraison;
  1688.         return $this;
  1689.     }
  1690.     public function getLastTypePaiement(): ?IctusTypePaiement
  1691.     {
  1692.         return $this->lastTypePaiement;
  1693.     }
  1694.     public function setLastTypePaiement(?IctusTypePaiement $lastTypePaiement): self
  1695.     {
  1696.         $this->lastTypePaiement $lastTypePaiement;
  1697.         return $this;
  1698.     }
  1699.     /**
  1700.      * @return Collection<int, RemiseUserPharmacie>
  1701.      */
  1702.     public function getRemiseUserPharmacies(): Collection
  1703.     {
  1704.         return $this->remiseUserPharmacies;
  1705.     }
  1706.     public function addRemiseUserPharmacy(RemiseUserPharmacie $remiseUserPharmacy): self
  1707.     {
  1708.         if (!$this->remiseUserPharmacies->contains($remiseUserPharmacy)) {
  1709.             $this->remiseUserPharmacies[] = $remiseUserPharmacy;
  1710.             $remiseUserPharmacy->setUser($this);
  1711.         }
  1712.         return $this;
  1713.     }
  1714.     public function removeRemiseUserPharmacy(RemiseUserPharmacie $remiseUserPharmacy): self
  1715.     {
  1716.         if ($this->remiseUserPharmacies->removeElement($remiseUserPharmacy)) {
  1717.             // set the owning side to null (unless already changed)
  1718.             if ($remiseUserPharmacy->getUser() === $this) {
  1719.                 $remiseUserPharmacy->setUser(null);
  1720.             }
  1721.         }
  1722.     }
  1723.     public function getFcmToken(): ?string
  1724.     {
  1725.         return $this->fcm_token;
  1726.     }
  1727.     public function setFcmToken(?string $fcm_token): self
  1728.     {
  1729.         $this->fcm_token $fcm_token;
  1730.         return $this;
  1731.     }
  1732.     public function isIsRemiseAuto(): ?bool
  1733.     {
  1734.         return $this->isRemiseAuto;
  1735.     }
  1736.     public function setIsRemiseAuto(?bool $isRemiseAuto): self
  1737.     {
  1738.         $this->isRemiseAuto $isRemiseAuto;
  1739.         return $this;
  1740.     }
  1741.     /**
  1742.      * @return Collection<int, Parrainage>
  1743.      */
  1744.     public function getParrainages(): Collection
  1745.     {
  1746.         return $this->parrainages;
  1747.     }
  1748.     public function addParrainage(Parrainage $parrainage): self
  1749.     {
  1750.         if (!$this->parrainages->contains($parrainage)) {
  1751.             $this->parrainages[] = $parrainage;
  1752.             $parrainage->setUser($this);
  1753.         }
  1754.         return $this;
  1755.     }
  1756.     public function removeParrainage(Parrainage $parrainage): self
  1757.     {
  1758.         if ($this->parrainages->removeElement($parrainage)) {
  1759.             // set the owning side to null (unless already changed)
  1760.             if ($parrainage->getUser() === $this) {
  1761.                 $parrainage->setUser(null);
  1762.             }
  1763.         }
  1764.         return $this;
  1765.     }
  1766.     /**
  1767.      * @return Collection<int, Favorite>
  1768.      */
  1769.     public function getFavorites(): Collection
  1770.     {
  1771.         return $this->favorites;
  1772.     }
  1773.     public function addFavorite(Favorite $favorite): self
  1774.     {
  1775.         if (!$this->favorites->contains($favorite)) {
  1776.             $this->favorites[] = $favorite;
  1777.             $favorite->setUser($this);
  1778.         }
  1779.         return $this;
  1780.     }
  1781.     public function removeFavorite(Favorite $favorite): self
  1782.     {
  1783.         if ($this->favorites->removeElement($favorite)) {
  1784.             // set the owning side to null (unless already changed)
  1785.             if ($favorite->getUser() === $this) {
  1786.                 $favorite->setUser(null);
  1787.             }
  1788.         }
  1789.         return $this;
  1790.     }
  1791.     /**
  1792.      * @return Collection<int, Carte>
  1793.      */
  1794.     public function getCartes(): Collection
  1795.     {
  1796.         return $this->cartes;
  1797.     }
  1798.     public function addCarte(Carte $carte): self
  1799.     {
  1800.         if (!$this->cartes->contains($carte)) {
  1801.             $this->cartes[] = $carte;
  1802.             $carte->setUser($this);
  1803.         }
  1804.         return $this;
  1805.     }
  1806.     public function removeCarte(Carte $carte): self
  1807.     {
  1808.         if ($this->cartes->removeElement($carte)) {
  1809.             // set the owning side to null (unless already changed)
  1810.             if ($carte->getUser() === $this) {
  1811.                 $carte->setUser(null);
  1812.             }
  1813.         }
  1814.         return $this;
  1815.     }
  1816.     /**
  1817.      * @return Collection<int, CertCertificat>
  1818.      */
  1819.     public function getCertCertificats(): Collection
  1820.     {
  1821.         return $this->certCertificats;
  1822.     }
  1823.     public function addCertCertificat(CertCertificat $certCertificat): self
  1824.     {
  1825.         if (!$this->certCertificats->contains($certCertificat)) {
  1826.             $this->certCertificats[] = $certCertificat;
  1827.             $certCertificat->setUser($this);
  1828.         }
  1829.         return $this;
  1830.     }
  1831.     public function removeCertCertificat(CertCertificat $certCertificat): self
  1832.     {
  1833.         if ($this->certCertificats->removeElement($certCertificat)) {
  1834.             // set the owning side to null (unless already changed)
  1835.             if ($certCertificat->getUser() === $this) {
  1836.                 $certCertificat->setUser(null);
  1837.             }
  1838.         }
  1839.         return $this;
  1840.     }
  1841.     public function isSexe(): ?int
  1842.     {
  1843.         return $this->sexe;
  1844.     }
  1845.     public function setSexe(?bool $sexe): self
  1846.     {
  1847.         $this->sexe $sexe;
  1848.         return $this;
  1849.     }
  1850.     public function getCodeParrainageOther(): ?string
  1851.     {
  1852.         return $this->codeParrainageOther;
  1853.     }
  1854.     public function setCodeParrainageOther(?string $codeParrainageOther): self
  1855.     {
  1856.         $this->codeParrainageOther $codeParrainageOther;
  1857.         return $this;
  1858.     }
  1859.     public function getCodeParrainageMine(): ?string
  1860.     {
  1861.         return $this->codeParrainageMine;
  1862.     }
  1863.     public function setCodeParrainageMine(?string $codeParrainageMine): self
  1864.     {
  1865.         $this->codeParrainageMine $codeParrainageMine;
  1866.         return $this;
  1867.     }
  1868.     public function getFullAdresse(): ?string
  1869.     {
  1870.         return $this->getAddress() . ", " $this->getQuartier()->getName() . ", " $this->getQuartier()->getVille()->getName();
  1871.     }
  1872.     public function getPrefixNumber(): ?string
  1873.     {
  1874.         return $this->prefixNumber;
  1875.     }
  1876.     public function setPrefixNumber(?string $prefixNumber): self
  1877.     {
  1878.         $this->prefixNumber $prefixNumber;
  1879.         return $this;
  1880.     }
  1881.     public function isIsDisponible(): ?bool
  1882.     {
  1883.         return $this->isDisponible;
  1884.     }
  1885.     public function setIsDisponible(?bool $isDisponible): self
  1886.     {
  1887.         $this->isDisponible $isDisponible;
  1888.         return $this;
  1889.     }
  1890. }