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)
  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.     public function __construct()
  378.     {
  379.         $this->propositions                   = new ArrayCollection();
  380.         $this->orders                         = new ArrayCollection();
  381.         $this->groupSuggestions               = new ArrayCollection();
  382.         $this->ordersGrossistes               = new ArrayCollection();
  383.         $this->users                          = new ArrayCollection();
  384.         $this->carts                          = new ArrayCollection();
  385.         $this->stockpharmacies                = new ArrayCollection();
  386.         $this->historiqueRefusPropositions    = new ArrayCollection();
  387.         $this->discutions                     = new ArrayCollection();
  388.         $this->reclamations                   = new ArrayCollection();
  389.         $this->forecasts                      = new ArrayCollection();
  390.         $this->userTypepaiements              = new ArrayCollection();
  391.         $this->historiquePaiements            = new ArrayCollection();
  392.         $this->instances_forecasts            = new ArrayCollection();
  393.         $this->ictusPanierPatients            = new ArrayCollection();
  394.         $this->ictusCommandes                 = new ArrayCollection();
  395.         $this->ictoRemboursements             = new ArrayCollection();
  396.         $this->is_acceptcgv                   = new \DateTime();
  397.         $this->cguaccepted                    = new \DateTime();
  398.         $this->ordonnances = new ArrayCollection();
  399.         $this->adresses = new ArrayCollection();
  400.         $this->ictusPanierSpecials = new ArrayCollection();
  401.         $this->commandeSpecials = new ArrayCollection();
  402.         $this->commandeSpecialsIctus = new ArrayCollection();
  403.         $this->nonDisponibilites = new ArrayCollection();
  404.         $this->facturePatients = new ArrayCollection();
  405.         $this->ictusReclamations = new ArrayCollection();
  406.         $this->ictusMobileAppareils = new ArrayCollection();
  407.         $this->livraisons = new ArrayCollection();
  408.         $this->parcours = new ArrayCollection();
  409.         $this->photoscreate = new ArrayCollection();
  410.         $this->ictoMouvements = new ArrayCollection();
  411.         $this->doublons = new ArrayCollection();
  412.         $this->rates = new ArrayCollection();
  413.         $this->searchHistories = new ArrayCollection();
  414.         $this->remiseUserPharmacies = new ArrayCollection();
  415.         $this->parrainages = new ArrayCollection();
  416.         $this->favorites = new ArrayCollection();
  417.     }
  418.     public function getNomComplet()
  419.     {
  420.         return $this->firstname ' ' $this->lastname;
  421.     }
  422.     public function getId(): ?int
  423.     {
  424.         return $this->id;
  425.     }
  426.     public function getEmail(): ?string
  427.     {
  428.         return $this->email;
  429.     }
  430.     public function setEmail(?string $email): self
  431.     {
  432.         $this->email $email;
  433.         return $this;
  434.     }
  435.     /**
  436.      * A visual identifier that represents this user.
  437.      *
  438.      * @see UserInterface
  439.      */
  440.     public function getUserIdentifier(): ?string
  441.     {
  442.         return (string) $this->email;
  443.     }
  444.     /**
  445.      * @deprecated since Symfony 5.3, use getUserIdentifier instead
  446.      */
  447.     public function getUsername(): ?string
  448.     {
  449.         return (string) $this->email;
  450.     }
  451.     /**
  452.      * @see UserInterface
  453.      */
  454.     public function getRoles(): array
  455.     {
  456.         $roles $this->roles;
  457.         // guarantee every user at least has ROLE_USER
  458.         $roles[] = 'ROLE_USER';
  459.         return array_unique($roles);
  460.     }
  461.     public function setRoles(array $roles): self
  462.     {
  463.         $this->roles $roles;
  464.         return $this;
  465.     }
  466.     /**
  467.      * @see PasswordAuthenticatedUserInterface
  468.      */
  469.     public function getPassword(): string
  470.     {
  471.         return $this->password;
  472.     }
  473.     public function setPassword(string $password): self
  474.     {
  475.         $this->password $password;
  476.         return $this;
  477.     }
  478.     /**
  479.      * Returning a salt is only needed, if you are not using a modern
  480.      * hashing algorithm (e.g. bcrypt or sodium) in your security.yaml.
  481.      *
  482.      * @see UserInterface
  483.      */
  484.     public function getSalt(): ?string
  485.     {
  486.         return null;
  487.     }
  488.     /**
  489.      * @see UserInterface
  490.      */
  491.     public function eraseCredentials() {}
  492.     public function getDesignation(): ?string
  493.     {
  494.         return $this->designation;
  495.     }
  496.     public function setDesignation(?string $designation): self
  497.     {
  498.         $this->designation $designation;
  499.         return $this;
  500.     }
  501.     public function getPhone(): ?string
  502.     {
  503.         return $this->phone;
  504.     }
  505.     public function setPhone(?string $phone): self
  506.     {
  507.         $this->phone $phone;
  508.         return $this;
  509.     }
  510.     public function getPhonetwo(): ?string
  511.     {
  512.         return $this->phonetwo;
  513.     }
  514.     public function setPhonetwo(?string $phonetwo): self
  515.     {
  516.         $this->phonetwo $phonetwo;
  517.         return $this;
  518.     }
  519.     public function getPhonethree(): ?string
  520.     {
  521.         return $this->phonethree;
  522.     }
  523.     public function setPhonethree(?string $phonethree): self
  524.     {
  525.         $this->phonethree $phonethree;
  526.         return $this;
  527.     }
  528.     public function getOrdre(): ?string
  529.     {
  530.         return $this->ordre;
  531.     }
  532.     public function setOrdre(?string $ordre): self
  533.     {
  534.         $this->ordre $ordre;
  535.         return $this;
  536.     }
  537.     public function getIsActive(): ?bool
  538.     {
  539.         return $this->is_active;
  540.     }
  541.     public function setIsActive(bool $is_active): self
  542.     {
  543.         $this->is_active $is_active;
  544.         return $this;
  545.     }
  546.     public function getFirstname(): ?string
  547.     {
  548.         return $this->firstname;
  549.     }
  550.     public function setFirstname(?string $firstname): self
  551.     {
  552.         $this->firstname $firstname;
  553.         return $this;
  554.     }
  555.     public function getLastname(): ?string
  556.     {
  557.         return $this->lastname;
  558.     }
  559.     public function setLastname(?string $lastname): self
  560.     {
  561.         $this->lastname $lastname;
  562.         return $this;
  563.     }
  564.     public function getFullName()
  565.     {
  566.         return $this->firstname ' ' $this->lastname;
  567.     }
  568.     public function getIsAcceptcgv(): ?\DateTimeInterface
  569.     {
  570.         return $this->is_acceptcgv;
  571.     }
  572.     public function setIsAcceptcgv(?\DateTimeInterface $is_acceptcgv): self
  573.     {
  574.         $this->is_acceptcgv $is_acceptcgv;
  575.         return $this;
  576.     }
  577.     public function getAddress(): ?string
  578.     {
  579.         return $this->address;
  580.     }
  581.     public function getCompleteAddress()
  582.     {
  583.         return $this->address ', ' $this->getQuartier() . ', ' $this->getVille();
  584.     }
  585.     public function setAddress(?string $address): self
  586.     {
  587.         $this->address $address;
  588.         return $this;
  589.     }
  590.     public function getPays(): ?string
  591.     {
  592.         return $this->pays;
  593.     }
  594.     public function setPays(?string $pays): self
  595.     {
  596.         $this->pays $pays;
  597.         return $this;
  598.     }
  599.     /**
  600.      * @return Collection<int, Proposition>
  601.      */
  602.     public function getPropositions(): Collection
  603.     {
  604.         return $this->propositions;
  605.     }
  606.     public function addProposition(Proposition $proposition): self
  607.     {
  608.         if (!$this->propositions->contains($proposition)) {
  609.             $this->propositions[] = $proposition;
  610.             $proposition->setUser($this);
  611.         }
  612.         return $this;
  613.     }
  614.     public function removeProposition(Proposition $proposition): self
  615.     {
  616.         if ($this->propositions->removeElement($proposition)) {
  617.             // set the owning side to null (unless already changed)
  618.             if ($proposition->getUser() === $this) {
  619.                 $proposition->setUser(null);
  620.             }
  621.         }
  622.         return $this;
  623.     }
  624.     public function getSpeciality(): ?Speciality
  625.     {
  626.         return $this->speciality;
  627.     }
  628.     public function setSpeciality(?Speciality $speciality): self
  629.     {
  630.         $this->speciality $speciality;
  631.         return $this;
  632.     }
  633.     /**
  634.      * @return Collection<int, Order>
  635.      */
  636.     public function getOrders(): Collection
  637.     {
  638.         return $this->orders;
  639.     }
  640.     public function addOrder(Order $order): self
  641.     {
  642.         if (!$this->orders->contains($order)) {
  643.             $this->orders[] = $order;
  644.             $order->setUser($this);
  645.         }
  646.         return $this;
  647.     }
  648.     public function removeOrder(Order $order): self
  649.     {
  650.         if ($this->orders->removeElement($order)) {
  651.             // set the owning side to null (unless already changed)
  652.             if ($order->getUser() === $this) {
  653.                 $order->setUser(null);
  654.             }
  655.         }
  656.         return $this;
  657.     }
  658.     public function getVille(): ?Ville
  659.     {
  660.         return $this->ville;
  661.     }
  662.     public function setVille(?Ville $ville): self
  663.     {
  664.         $this->ville $ville;
  665.         return $this;
  666.     }
  667.     public function getQuartier(): ?Quartier
  668.     {
  669.         return $this->quartier;
  670.     }
  671.     public function setQuartier(?Quartier $quartier): self
  672.     {
  673.         $this->quartier $quartier;
  674.         return $this;
  675.     }
  676.     /**
  677.      * @return Collection<int, GroupSuggestion>
  678.      */
  679.     public function getGroupSuggestions(): Collection
  680.     {
  681.         return $this->groupSuggestions;
  682.     }
  683.     public function addGroupSuggestion(GroupSuggestion $groupSuggestion): self
  684.     {
  685.         if (!$this->groupSuggestions->contains($groupSuggestion)) {
  686.             $this->groupSuggestions[] = $groupSuggestion;
  687.             $groupSuggestion->setUser($this);
  688.         }
  689.         return $this;
  690.     }
  691.     public function removeGroupSuggestion(GroupSuggestion $groupSuggestion): self
  692.     {
  693.         if ($this->groupSuggestions->removeElement($groupSuggestion)) {
  694.             // set the owning side to null (unless already changed)
  695.             if ($groupSuggestion->getUser() === $this) {
  696.                 $groupSuggestion->setUser(null);
  697.             }
  698.         }
  699.         return $this;
  700.     }
  701.     /**
  702.      * @return Collection<int, Order>
  703.      */
  704.     public function getOrdersGrossistes(): Collection
  705.     {
  706.         return $this->ordersGrossistes;
  707.     }
  708.     public function addOrdersGrossiste(Order $ordersGrossiste): self
  709.     {
  710.         if (!$this->ordersGrossistes->contains($ordersGrossiste)) {
  711.             $this->ordersGrossistes[] = $ordersGrossiste;
  712.             $ordersGrossiste->setGrossiste($this);
  713.         }
  714.         return $this;
  715.     }
  716.     public function removeOrdersGrossiste(Order $ordersGrossiste): self
  717.     {
  718.         if ($this->ordersGrossistes->removeElement($ordersGrossiste)) {
  719.             // set the owning side to null (unless already changed)
  720.             if ($ordersGrossiste->getGrossiste() === $this) {
  721.                 $ordersGrossiste->setGrossiste(null);
  722.             }
  723.         }
  724.         return $this;
  725.     }
  726.     public function getGrossiste(): ?self
  727.     {
  728.         return $this->grossiste;
  729.     }
  730.     public function setGrossiste(?self $grossiste): self
  731.     {
  732.         $this->grossiste $grossiste;
  733.         return $this;
  734.     }
  735.     /**
  736.      * @return Collection<int, self>
  737.      */
  738.     public function getUsers(): Collection
  739.     {
  740.         return $this->users;
  741.     }
  742.     public function addUser(self $user): self
  743.     {
  744.         if (!$this->users->contains($user)) {
  745.             $this->users[] = $user;
  746.             $user->setGrossiste($this);
  747.         }
  748.         return $this;
  749.     }
  750.     public function removeUser(self $user): self
  751.     {
  752.         if ($this->users->removeElement($user)) {
  753.             // set the owning side to null (unless already changed)
  754.             if ($user->getGrossiste() === $this) {
  755.                 $user->setGrossiste(null);
  756.             }
  757.         }
  758.         return $this;
  759.     }
  760.     /**
  761.      * @return Collection<int, Cart>
  762.      */
  763.     public function getCarts(): Collection
  764.     {
  765.         return $this->carts;
  766.     }
  767.     public function addCart(Cart $cart): self
  768.     {
  769.         if (!$this->carts->contains($cart)) {
  770.             $this->carts[] = $cart;
  771.             $cart->setUser($this);
  772.         }
  773.         return $this;
  774.     }
  775.     public function removeCart(Cart $cart): self
  776.     {
  777.         if ($this->carts->removeElement($cart)) {
  778.             // set the owning side to null (unless already changed)
  779.             if ($cart->getUser() === $this) {
  780.                 $cart->setUser(null);
  781.             }
  782.         }
  783.         return $this;
  784.     }
  785.     /**
  786.      * @return Collection<int, Stockpharmacie>
  787.      */
  788.     public function getStockpharmacies(): Collection
  789.     {
  790.         return $this->stockpharmacies;
  791.     }
  792.     public function addStockpharmacy(Stockpharmacie $stockpharmacy): self
  793.     {
  794.         if (!$this->stockpharmacies->contains($stockpharmacy)) {
  795.             $this->stockpharmacies[] = $stockpharmacy;
  796.             $stockpharmacy->setUser($this);
  797.         }
  798.         return $this;
  799.     }
  800.     public function removeStockpharmacy(Stockpharmacie $stockpharmacy): self
  801.     {
  802.         if ($this->stockpharmacies->removeElement($stockpharmacy)) {
  803.             // set the owning side to null (unless already changed)
  804.             if ($stockpharmacy->getUser() === $this) {
  805.                 $stockpharmacy->setUser(null);
  806.             }
  807.         }
  808.         return $this;
  809.     }
  810.     /**
  811.      * @return Collection<int, HistoriqueRefusProposition>
  812.      */
  813.     public function getHistoriqueRefusPropositions(): Collection
  814.     {
  815.         return $this->historiqueRefusPropositions;
  816.     }
  817.     public function addHistoriqueRefusProposition(HistoriqueRefusProposition $historiqueRefusProposition): self
  818.     {
  819.         if (!$this->historiqueRefusPropositions->contains($historiqueRefusProposition)) {
  820.             $this->historiqueRefusPropositions[] = $historiqueRefusProposition;
  821.             $historiqueRefusProposition->setPharmcie($this);
  822.         }
  823.         return $this;
  824.     }
  825.     public function removeHistoriqueRefusProposition(HistoriqueRefusProposition $historiqueRefusProposition): self
  826.     {
  827.         if ($this->historiqueRefusPropositions->removeElement($historiqueRefusProposition)) {
  828.             // set the owning side to null (unless already changed)
  829.             if ($historiqueRefusProposition->getPharmcie() === $this) {
  830.                 $historiqueRefusProposition->setPharmcie(null);
  831.             }
  832.         }
  833.         return $this;
  834.     }
  835.     public function getPayslocalisation(): ?Pays
  836.     {
  837.         return $this->payslocalisation;
  838.     }
  839.     public function setPayslocalisation(?Pays $payslocalisation): self
  840.     {
  841.         $this->payslocalisation $payslocalisation;
  842.         return $this;
  843.     }
  844.     public function getUrlexcelcmd(): ?string
  845.     {
  846.         return $this->urlexcelcmd;
  847.     }
  848.     public function setUrlexcelcmd(?string $urlexcelcmd): self
  849.     {
  850.         $this->urlexcelcmd $urlexcelcmd;
  851.         return $this;
  852.     }
  853.     public function getIsPaid(): ?bool
  854.     {
  855.         return $this->isPaid;
  856.     }
  857.     public function setIsPaid(?bool $isPaid): self
  858.     {
  859.         $this->isPaid $isPaid;
  860.         return $this;
  861.     }
  862.     /**
  863.      * @return Collection<int, Discution>
  864.      */
  865.     public function getDiscutions(): Collection
  866.     {
  867.         return $this->discutions;
  868.     }
  869.     public function addDiscution(Discution $discution): self
  870.     {
  871.         if (!$this->discutions->contains($discution)) {
  872.             $this->discutions[] = $discution;
  873.             $discution->setUser($this);
  874.         }
  875.         return $this;
  876.     }
  877.     public function removeDiscution(Discution $discution): self
  878.     {
  879.         if ($this->discutions->removeElement($discution)) {
  880.             // set the owning side to null (unless already changed)
  881.             if ($discution->getUser() === $this) {
  882.                 $discution->setUser(null);
  883.             }
  884.         }
  885.         return $this;
  886.     }
  887.     /**
  888.      * @return Collection<int, Reclamation>
  889.      */
  890.     public function getReclamations(): Collection
  891.     {
  892.         return $this->reclamations;
  893.     }
  894.     public function addReclamation(Reclamation $reclamation): self
  895.     {
  896.         if (!$this->reclamations->contains($reclamation)) {
  897.             $this->reclamations[] = $reclamation;
  898.             $reclamation->setUser($this);
  899.         }
  900.         return $this;
  901.     }
  902.     public function removeReclamation(Reclamation $reclamation): self
  903.     {
  904.         if ($this->reclamations->removeElement($reclamation)) {
  905.             // set the owning side to null (unless already changed)
  906.             if ($reclamation->getUser() === $this) {
  907.                 $reclamation->setUser(null);
  908.             }
  909.         }
  910.         return $this;
  911.     }
  912.     public function getImage(): ?string
  913.     {
  914.         return $this->image;
  915.     }
  916.     public function setImage(?string $image): self
  917.     {
  918.         $this->image $image;
  919.         return $this;
  920.     }
  921.     public function getUpdatedAt(): ?\DateTimeInterface
  922.     {
  923.         return $this->updatedAt;
  924.     }
  925.     public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
  926.     {
  927.         $this->updatedAt $updatedAt;
  928.         return $this;
  929.     }
  930.     //pour l'upload image
  931.     public function setImageFile(?File $imageFile null): User
  932.     {
  933.         $this->imageFile $imageFile;
  934.         if ($imageFile instanceof UploadedFile) {
  935.             $this->updatedAt = new \DateTime('now');
  936.         }
  937.         return $this;
  938.     }
  939.     public function getImageFile(): ?File
  940.     {
  941.         return $this->imageFile;
  942.     }
  943.     public function serialize()
  944.     {
  945.         return serialize(array(
  946.             $this->id,
  947.             $this->email,
  948.             $this->password,
  949.         ));
  950.     }
  951.     public function unserialize($serialized)
  952.     {
  953.         list(
  954.             $this->id,
  955.             $this->email,
  956.             $this->password,
  957.         ) = unserialize($serialized);
  958.     }
  959.     public function getVerificationCode(): ?string
  960.     {
  961.         return $this->verificationCode;
  962.     }
  963.     public function setVerificationCode(?string $verificationCode): self
  964.     {
  965.         $this->verificationCode $verificationCode;
  966.         return $this;
  967.     }
  968.     public function getVerified(): ?int
  969.     {
  970.         return $this->verified;
  971.     }
  972.     public function setVerified(?int $verified): self
  973.     {
  974.         $this->verified $verified;
  975.         return $this;
  976.     }
  977.     /**
  978.      * @return Collection<int, Forecast>
  979.      */
  980.     public function getForecasts(): Collection
  981.     {
  982.         return $this->forecasts;
  983.     }
  984.     public function addForecast(Forecast $forecast): self
  985.     {
  986.         if (!$this->forecasts->contains($forecast)) {
  987.             $this->forecasts[] = $forecast;
  988.             $forecast->setUser($this);
  989.         }
  990.         return $this;
  991.     }
  992.     public function removeForecast(Forecast $forecast): self
  993.     {
  994.         if ($this->forecasts->removeElement($forecast)) {
  995.             // set the owning side to null (unless already changed)
  996.             if ($forecast->getUser() === $this) {
  997.                 $forecast->setUser(null);
  998.             }
  999.         }
  1000.         return $this;
  1001.     }
  1002.     /**
  1003.      * @return Collection<int, UserTypepaiement>
  1004.      */
  1005.     public function getUserTypepaiements(): Collection
  1006.     {
  1007.         return $this->userTypepaiements;
  1008.     }
  1009.     public function addUserTypepaiement(UserTypepaiement $userTypepaiement): self
  1010.     {
  1011.         if (!$this->userTypepaiements->contains($userTypepaiement)) {
  1012.             $this->userTypepaiements[] = $userTypepaiement;
  1013.             $userTypepaiement->setUsers($this);
  1014.         }
  1015.         return $this;
  1016.     }
  1017.     public function removeUserTypepaiement(UserTypepaiement $userTypepaiement): self
  1018.     {
  1019.         if ($this->userTypepaiements->removeElement($userTypepaiement)) {
  1020.             // set the owning side to null (unless already changed)
  1021.             if ($userTypepaiement->getUsers() === $this) {
  1022.                 $userTypepaiement->setUsers(null);
  1023.             }
  1024.         }
  1025.         return $this;
  1026.     }
  1027.     public function getTypepaiements(): ?Typepaiement
  1028.     {
  1029.         return $this->typepaiements;
  1030.     }
  1031.     public function setTypepaiements(?Typepaiement $typepaiements): self
  1032.     {
  1033.         $this->typepaiements $typepaiements;
  1034.         return $this;
  1035.     }
  1036.     /**
  1037.      * @return Collection<int, HistoriquePaiement>
  1038.      */
  1039.     public function getHistoriquePaiements(): Collection
  1040.     {
  1041.         return $this->historiquePaiements;
  1042.     }
  1043.     public function addHistoriquePaiement(HistoriquePaiement $historiquePaiement): self
  1044.     {
  1045.         if (!$this->historiquePaiements->contains($historiquePaiement)) {
  1046.             $this->historiquePaiements[] = $historiquePaiement;
  1047.             $historiquePaiement->setUser($this);
  1048.         }
  1049.         return $this;
  1050.     }
  1051.     public function removeHistoriquePaiement(HistoriquePaiement $historiquePaiement): self
  1052.     {
  1053.         if ($this->historiquePaiements->removeElement($historiquePaiement)) {
  1054.             // set the owning side to null (unless already changed)
  1055.             if ($historiquePaiement->getUser() === $this) {
  1056.                 $historiquePaiement->setUser(null);
  1057.             }
  1058.         }
  1059.         return $this;
  1060.     }
  1061.     /**
  1062.      * @return Collection<int, Forecast>
  1063.      */
  1064.     public function getInstancesForecasts(): Collection
  1065.     {
  1066.         return $this->instances_forecasts;
  1067.     }
  1068.     public function addInstancesForecast(Forecast $instancesForecast): self
  1069.     {
  1070.         if (!$this->instances_forecasts->contains($instancesForecast)) {
  1071.             $this->instances_forecasts[] = $instancesForecast;
  1072.             $instancesForecast->setGrossiste($this);
  1073.         }
  1074.         return $this;
  1075.     }
  1076.     public function removeInstancesForecast(Forecast $instancesForecast): self
  1077.     {
  1078.         if ($this->instances_forecasts->removeElement($instancesForecast)) {
  1079.             // set the owning side to null (unless already changed)
  1080.             if ($instancesForecast->getGrossiste() === $this) {
  1081.                 $instancesForecast->setGrossiste(null);
  1082.             }
  1083.         }
  1084.         return $this;
  1085.     }
  1086.     public function getIctusPharmacie(): ?IctusPharmacie
  1087.     {
  1088.         return $this->ictusPharmacie;
  1089.     }
  1090.     public function setIctusPharmacie(?IctusPharmacie $ictusPharmacie): self
  1091.     {
  1092.         $this->ictusPharmacie $ictusPharmacie;
  1093.         return $this;
  1094.     }
  1095.     /**
  1096.      * @return Collection<int, IctusPanierPatient>
  1097.      */
  1098.     public function getIctusPanierPatients(): Collection
  1099.     {
  1100.         return $this->ictusPanierPatients;
  1101.     }
  1102.     public function addIctusPanierPatient(IctusPanierPatient $ictusPanierPatient): self
  1103.     {
  1104.         if (!$this->ictusPanierPatients->contains($ictusPanierPatient)) {
  1105.             $this->ictusPanierPatients[] = $ictusPanierPatient;
  1106.             $ictusPanierPatient->setUser($this);
  1107.         }
  1108.         return $this;
  1109.     }
  1110.     public function removeIctusPanierPatient(IctusPanierPatient $ictusPanierPatient): self
  1111.     {
  1112.         if ($this->ictusPanierPatients->removeElement($ictusPanierPatient)) {
  1113.             // set the owning side to null (unless already changed)
  1114.             if ($ictusPanierPatient->getUser() === $this) {
  1115.                 $ictusPanierPatient->setUser(null);
  1116.             }
  1117.         }
  1118.         return $this;
  1119.     }
  1120.     /**
  1121.      * @return Collection<int, IctusCommande>
  1122.      */
  1123.     public function getIctusCommandes(): Collection
  1124.     {
  1125.         return $this->ictusCommandes;
  1126.     }
  1127.     public function addIctusCommande(IctusCommande $ictusCommande): self
  1128.     {
  1129.         if (!$this->ictusCommandes->contains($ictusCommande)) {
  1130.             $this->ictusCommandes[] = $ictusCommande;
  1131.             $ictusCommande->setUser($this);
  1132.         }
  1133.         return $this;
  1134.     }
  1135.     public function removeIctusCommande(IctusCommande $ictusCommande): self
  1136.     {
  1137.         if ($this->ictusCommandes->removeElement($ictusCommande)) {
  1138.             // set the owning side to null (unless already changed)
  1139.             if ($ictusCommande->getUser() === $this) {
  1140.                 $ictusCommande->setUser(null);
  1141.             }
  1142.         }
  1143.         return $this;
  1144.     }
  1145.     public function getLatitude(): ?float
  1146.     {
  1147.         return $this->latitude;
  1148.     }
  1149.     public function setLatitude(?float $latitude): self
  1150.     {
  1151.         $this->latitude $latitude;
  1152.         return $this;
  1153.     }
  1154.     public function getLogitude(): ?float
  1155.     {
  1156.         return $this->logitude;
  1157.     }
  1158.     public function setLogitude(?float $logitude): self
  1159.     {
  1160.         $this->logitude $logitude;
  1161.         return $this;
  1162.     }
  1163.     /**
  1164.      * @return Collection<int, IctoRemboursement>
  1165.      */
  1166.     public function getIctoRemboursements(): Collection
  1167.     {
  1168.         return $this->ictoRemboursements;
  1169.     }
  1170.     public function addIctoRemboursement(IctoRemboursement $ictoRemboursement): self
  1171.     {
  1172.         if (!$this->ictoRemboursements->contains($ictoRemboursement)) {
  1173.             $this->ictoRemboursements[] = $ictoRemboursement;
  1174.             $ictoRemboursement->setPayeur($this);
  1175.         }
  1176.         return $this;
  1177.     }
  1178.     public function removeIctoRemboursement(IctoRemboursement $ictoRemboursement): self
  1179.     {
  1180.         if ($this->ictoRemboursements->removeElement($ictoRemboursement)) {
  1181.             // set the owning side to null (unless already changed)
  1182.             if ($ictoRemboursement->getPayeur() === $this) {
  1183.                 $ictoRemboursement->setPayeur(null);
  1184.             }
  1185.         }
  1186.         return $this;
  1187.     }
  1188.     public function isCguaccepted(): ?\DateTimeInterface
  1189.     {
  1190.         return $this->cguaccepted;
  1191.     }
  1192.     public function setCguaccepted(?\DateTimeInterface $cguaccepted): self
  1193.     {
  1194.         $this->cguaccepted $cguaccepted;
  1195.         return $this;
  1196.     }
  1197.     public function isIsAdmin(): ?bool
  1198.     {
  1199.         return $this->isAdmin;
  1200.     }
  1201.     public function setIsAdmin(?bool $isAdmin): self
  1202.     {
  1203.         $this->isAdmin $isAdmin;
  1204.         return $this;
  1205.     }
  1206.     public function getCIN(): ?string
  1207.     {
  1208.         return $this->CIN;
  1209.     }
  1210.     public function setCIN(?string $CIN): self
  1211.     {
  1212.         $this->CIN $CIN;
  1213.         return $this;
  1214.     }
  1215.     /**
  1216.      * @return Collection<int, Ordonnance>
  1217.      */
  1218.     public function getOrdonnances(): Collection
  1219.     {
  1220.         return $this->ordonnances;
  1221.     }
  1222.     public function addOrdonnance(Ordonnance $ordonnance): self
  1223.     {
  1224.         if (!$this->ordonnances->contains($ordonnance)) {
  1225.             $this->ordonnances[] = $ordonnance;
  1226.             $ordonnance->setPropriertaire($this);
  1227.         }
  1228.         return $this;
  1229.     }
  1230.     public function removeOrdonnance(Ordonnance $ordonnance): self
  1231.     {
  1232.         if ($this->ordonnances->removeElement($ordonnance)) {
  1233.             // set the owning side to null (unless already changed)
  1234.             if ($ordonnance->getPropriertaire() === $this) {
  1235.                 $ordonnance->setPropriertaire(null);
  1236.             }
  1237.         }
  1238.         return $this;
  1239.     }
  1240.     /**
  1241.      * @return Collection<int, Adresse>
  1242.      */
  1243.     public function getAdresses(): Collection
  1244.     {
  1245.         return $this->adresses;
  1246.     }
  1247.     public function addAdress(Adresse $adress): self
  1248.     {
  1249.         if (!$this->adresses->contains($adress)) {
  1250.             $this->adresses[] = $adress;
  1251.             $adress->setPatient($this);
  1252.         }
  1253.         return $this;
  1254.     }
  1255.     public function removeAdress(Adresse $adress): self
  1256.     {
  1257.         if ($this->adresses->removeElement($adress)) {
  1258.             // set the owning side to null (unless already changed)
  1259.             if ($adress->getPatient() === $this) {
  1260.                 $adress->setPatient(null);
  1261.             }
  1262.         }
  1263.         return $this;
  1264.     }
  1265.     public function getSocieteLivraison(): ?SocieteLivraison
  1266.     {
  1267.         return $this->societeLivraison;
  1268.     }
  1269.     public function setSocieteLivraison(?SocieteLivraison $societeLivraison): self
  1270.     {
  1271.         $this->societeLivraison $societeLivraison;
  1272.     }
  1273.     /**
  1274.      * @return Collection<int, IctusPanierSpecial>
  1275.      */
  1276.     public function getIctusPanierSpecials(): Collection
  1277.     {
  1278.         return $this->ictusPanierSpecials;
  1279.     }
  1280.     public function addIctusPanierSpecial(IctusPanierSpecial $ictusPanierSpecial): self
  1281.     {
  1282.         if (!$this->ictusPanierSpecials->contains($ictusPanierSpecial)) {
  1283.             $this->ictusPanierSpecials[] = $ictusPanierSpecial;
  1284.             $ictusPanierSpecial->setUser($this);
  1285.         }
  1286.         return $this;
  1287.     }
  1288.     public function getReinitmdp(): ?string
  1289.     {
  1290.         return $this->reinitmdp;
  1291.     }
  1292.     public function setReinitmdp(?string $reinitmdp): self
  1293.     {
  1294.         $this->reinitmdp $reinitmdp;
  1295.         return $this;
  1296.     }
  1297.     public function getValidateCode(): ?string
  1298.     {
  1299.         return $this->validate_code;
  1300.     }
  1301.     public function setValidateCode(?string $validate_code): self
  1302.     {
  1303.         $this->validate_code $validate_code;
  1304.         return $this;
  1305.     }
  1306.     public function removeIctusPanierSpecial(IctusPanierSpecial $ictusPanierSpecial): self
  1307.     {
  1308.         if ($this->ictusPanierSpecials->removeElement($ictusPanierSpecial)) {
  1309.             // set the owning side to null (unless already changed)
  1310.             if ($ictusPanierSpecial->getUser() === $this) {
  1311.                 $ictusPanierSpecial->setUser(null);
  1312.             }
  1313.         }
  1314.         return $this;
  1315.     }
  1316.     /**
  1317.      * @return Collection<int, CommandeSpecial>
  1318.      */
  1319.     public function getCommandeSpecials(): Collection
  1320.     {
  1321.         return $this->commandeSpecials;
  1322.     }
  1323.     public function addCommandeSpecial(CommandeSpecial $commandeSpecial): self
  1324.     {
  1325.         if (!$this->commandeSpecials->contains($commandeSpecial)) {
  1326.             $this->commandeSpecials[] = $commandeSpecial;
  1327.             $commandeSpecial->setGrossiste($this);
  1328.         }
  1329.         return $this;
  1330.     }
  1331.     public function removeCommandeSpecial(CommandeSpecial $commandeSpecial): self
  1332.     {
  1333.         if ($this->commandeSpecials->removeElement($commandeSpecial)) {
  1334.             // set the owning side to null (unless already changed)
  1335.             if ($commandeSpecial->getGrossiste() === $this) {
  1336.                 $commandeSpecial->setGrossiste(null);
  1337.             }
  1338.         }
  1339.         return $this;
  1340.     }
  1341.     public function getExpiredreinitmdp(): ?\DateTimeInterface
  1342.     {
  1343.         return $this->expiredreinitmdp;
  1344.     }
  1345.     public function setExpiredreinitmdp(?\DateTimeInterface $expiredreinitmdp): self
  1346.     {
  1347.         $this->expiredreinitmdp $expiredreinitmdp;
  1348.         return $this;
  1349.     }
  1350.     /**
  1351.      * @return Collection<int, CommandeSpecial>
  1352.      */
  1353.     public function getCommandeSpecialsIctus(): Collection
  1354.     {
  1355.         return $this->commandeSpecialsIctus;
  1356.     }
  1357.     public function addCommandeSpecialsIctu(CommandeSpecial $commandeSpecialsIctu): self
  1358.     {
  1359.         if (!$this->commandeSpecialsIctus->contains($commandeSpecialsIctu)) {
  1360.             $this->commandeSpecialsIctus[] = $commandeSpecialsIctu;
  1361.             $commandeSpecialsIctu->setUser($this);
  1362.         }
  1363.         return $this;
  1364.     }
  1365.     public function removeCommandeSpecialsIctu(CommandeSpecial $commandeSpecialsIctu): self
  1366.     {
  1367.         if ($this->commandeSpecialsIctus->removeElement($commandeSpecialsIctu)) {
  1368.             // set the owning side to null (unless already changed)
  1369.             if ($commandeSpecialsIctu->getUser() === $this) {
  1370.                 $commandeSpecialsIctu->setUser(null);
  1371.             }
  1372.         }
  1373.         return $this;
  1374.     }
  1375.     /**
  1376.      * @return Collection<int, NonDisponibilite>
  1377.      */
  1378.     public function getNonDisponibilites(): Collection
  1379.     {
  1380.         return $this->nonDisponibilites;
  1381.     }
  1382.     public function addNonDisponibilite(NonDisponibilite $nonDisponibilite): self
  1383.     {
  1384.         if (!$this->nonDisponibilites->contains($nonDisponibilite)) {
  1385.             $this->nonDisponibilites[] = $nonDisponibilite;
  1386.             $nonDisponibilite->setLivreur($this);
  1387.         }
  1388.     }
  1389.     /**
  1390.      * @return Collection<int, FacturePatient>
  1391.      */
  1392.     public function getFacturePatients(): Collection
  1393.     {
  1394.         return $this->facturePatients;
  1395.     }
  1396.     public function addFacturePatient(FacturePatient $facturePatient): self
  1397.     {
  1398.         if (!$this->facturePatients->contains($facturePatient)) {
  1399.             $this->facturePatients[] = $facturePatient;
  1400.             $facturePatient->setUser($this);
  1401.         }
  1402.         return $this;
  1403.     }
  1404.     public function removeNonDisponibilite(NonDisponibilite $nonDisponibilite): self
  1405.     {
  1406.         if ($this->nonDisponibilites->removeElement($nonDisponibilite)) {
  1407.             // set the owning side to null (unless already changed)
  1408.             if ($nonDisponibilite->getLivreur() === $this) {
  1409.                 $nonDisponibilite->setLivreur(null);
  1410.             }
  1411.         }
  1412.     }
  1413.     public function removeFacturePatient(FacturePatient $facturePatient): self
  1414.     {
  1415.         if ($this->facturePatients->removeElement($facturePatient)) {
  1416.             // set the owning side to null (unless already changed)
  1417.             if ($facturePatient->getUser() === $this) {
  1418.                 $facturePatient->setUser(null);
  1419.             }
  1420.         }
  1421.         return $this;
  1422.     }
  1423.     public  function getPanierTotal()
  1424.     {
  1425.         $total 0;
  1426.         foreach ($this->getIctusPanierPatients() as $panier) {
  1427.             $total += $panier->getTotal();
  1428.         }
  1429.         return (int)$total;
  1430.     }
  1431.     public function getReferenceClientTP(): ?string
  1432.     {
  1433.         return $this->referenceClientTP;
  1434.     }
  1435.     public function setReferenceClientTP(?string $referenceClientTP): self
  1436.     {
  1437.         $this->referenceClientTP $referenceClientTP;
  1438.         return $this;
  1439.     }
  1440.     public function getSocietename(): ?string
  1441.     {
  1442.         return $this->societename;
  1443.     }
  1444.     public function setSocietename(?string $societename): self
  1445.     {
  1446.         $this->societename $societename;
  1447.         return $this;
  1448.     }
  1449.     public function getDatenaissance(): ?\DateTimeInterface
  1450.     {
  1451.         return $this->datenaissance;
  1452.     }
  1453.     public function setDatenaissance(?\DateTimeInterface $datenaissance): self
  1454.     {
  1455.         $this->datenaissance $datenaissance;
  1456.         return $this;
  1457.     }
  1458.     /**
  1459.      * @return Collection<int, Livraison>
  1460.      */
  1461.     public function getLivraisons(): Collection
  1462.     {
  1463.         return $this->livraisons;
  1464.     }
  1465.     public function addLivraison(Livraison $livraison): self
  1466.     {
  1467.         if (!$this->livraisons->contains($livraison)) {
  1468.             $this->livraisons[] = $livraison;
  1469.             $livraison->setLivreur($this);
  1470.         }
  1471.         return $this;
  1472.     }
  1473.     public function removeLivraison(Livraison $livraison): self
  1474.     {
  1475.         if ($this->livraisons->removeElement($livraison)) {
  1476.             // set the owning side to null (unless already changed)
  1477.             if ($livraison->getLivreur() === $this) {
  1478.                 $livraison->setLivreur(null);
  1479.             }
  1480.         }
  1481.         return $this;
  1482.     }
  1483.     /**
  1484.      * @return Collection<int, IctusMobileAppareil>
  1485.      */
  1486.     public function getIctusMobileAppareils(): Collection
  1487.     {
  1488.         return $this->ictusMobileAppareils;
  1489.     }
  1490.     public function addIctusMobileAppareil(IctusMobileAppareil $ictusMobileAppareil): self
  1491.     {
  1492.         if (!$this->ictusMobileAppareils->contains($ictusMobileAppareil)) {
  1493.             $this->ictusMobileAppareils[] = $ictusMobileAppareil;
  1494.             $ictusMobileAppareil->setUser($this);
  1495.         }
  1496.         return $this;
  1497.     }
  1498.     public function removeIctusMobileAppareil(IctusMobileAppareil $ictusMobileAppareil): self
  1499.     {
  1500.         if ($this->ictusMobileAppareils->removeElement($ictusMobileAppareil)) {
  1501.             // set the owning side to null (unless already changed)
  1502.             if ($ictusMobileAppareil->getUser() === $this) {
  1503.                 $ictusMobileAppareil->setUser(null);
  1504.             }
  1505.         }
  1506.         return $this;
  1507.     }
  1508.     /**
  1509.      * @return Collection<int, Photo>
  1510.      */
  1511.     public function getPhotoscreate(): Collection
  1512.     {
  1513.         return $this->photoscreate;
  1514.     }
  1515.     public function addPhotoscreate(Photo $photoscreate): self
  1516.     {
  1517.         if (!$this->photoscreate->contains($photoscreate)) {
  1518.             $this->photoscreate[] = $photoscreate;
  1519.             $photoscreate->setCreator($this);
  1520.         }
  1521.         return $this;
  1522.     }
  1523.     public function removePhotoscreate(Photo $photoscreate): self
  1524.     {
  1525.         if ($this->photoscreate->removeElement($photoscreate)) {
  1526.             // set the owning side to null (unless already changed)
  1527.             if ($photoscreate->getCreator() === $this) {
  1528.                 $photoscreate->setCreator(null);
  1529.             }
  1530.         }
  1531.         return $this;
  1532.     }
  1533.     public function getRangphoto(): ?int
  1534.     {
  1535.         return $this->rangphoto;
  1536.     }
  1537.     public function setRangphoto(?int $rangphoto): self
  1538.     {
  1539.         $this->rangphoto $rangphoto;
  1540.         return $this;
  1541.     }
  1542.     public function getServiceSopharmad(): ?string
  1543.     {
  1544.         return $this->serviceSopharmad;
  1545.     }
  1546.     public function setServiceSopharmad(?string $serviceSopharmad): self
  1547.     {
  1548.         $this->serviceSopharmad $serviceSopharmad;
  1549.         return $this;
  1550.     }
  1551.     /**
  1552.      * @return Collection<int, IctoMouvement>
  1553.      */
  1554.     public function getIctoMouvements(): Collection
  1555.     {
  1556.         return $this->ictoMouvements;
  1557.     }
  1558.     public function addIctoMouvement(IctoMouvement $ictoMouvement): self
  1559.     {
  1560.         if (!$this->ictoMouvements->contains($ictoMouvement)) {
  1561.             $this->ictoMouvements[] = $ictoMouvement;
  1562.             $ictoMouvement->setUser($this);
  1563.         }
  1564.         return $this;
  1565.     }
  1566.     public function removeIctoMouvement(IctoMouvement $ictoMouvement): self
  1567.     {
  1568.         if ($this->ictoMouvements->removeElement($ictoMouvement)) {
  1569.             // set the owning side to null (unless already changed)
  1570.             if ($ictoMouvement->getUser() === $this) {
  1571.                 $ictoMouvement->setUser(null);
  1572.             }
  1573.         }
  1574.         return $this;
  1575.     }
  1576.     /**
  1577.      * @return Collection<int, Doublon>
  1578.      */
  1579.     public function getDoublons(): Collection
  1580.     {
  1581.         return $this->doublons;
  1582.     }
  1583.     public function addDoublon(Doublon $doublon): self
  1584.     {
  1585.         if (!$this->doublons->contains($doublon)) {
  1586.             $this->doublons[] = $doublon;
  1587.             $doublon->setUser($this);
  1588.         }
  1589.         return $this;
  1590.     }
  1591.     public function removeDoublon(Doublon $doublon): self
  1592.     {
  1593.         if ($this->doublons->removeElement($doublon)) {
  1594.             // set the owning side to null (unless already changed)
  1595.             if ($doublon->getUser() === $this) {
  1596.                 $doublon->setUser(null);
  1597.             }
  1598.         }
  1599.         return $this;
  1600.     }
  1601.     /**
  1602.      * @return Collection<int, Rate>
  1603.      */
  1604.     public function getRates(): Collection
  1605.     {
  1606.         return $this->rates;
  1607.     }
  1608.     public function addRate(Rate $rate): self
  1609.     {
  1610.         if (!$this->rates->contains($rate)) {
  1611.             $this->rates[] = $rate;
  1612.             $rate->setUser($this);
  1613.         }
  1614.         return $this;
  1615.     }
  1616.     public function removeRate(Rate $rate): self
  1617.     {
  1618.         if ($this->rates->removeElement($rate)) {
  1619.             // set the owning side to null (unless already changed)
  1620.             if ($rate->getUser() === $this) {
  1621.                 $rate->setUser(null);
  1622.             }
  1623.         }
  1624.         return $this;
  1625.     }
  1626.     /**
  1627.      * @return Collection<int, SearchHistory>
  1628.      */
  1629.     public function getSearchHistories(): Collection
  1630.     {
  1631.         return $this->searchHistories;
  1632.     }
  1633.     public function addSearchHistory(SearchHistory $searchHistory): self
  1634.     {
  1635.         if (!$this->searchHistories->contains($searchHistory)) {
  1636.             $this->searchHistories[] = $searchHistory;
  1637.             $searchHistory->setUser($this);
  1638.         }
  1639.         return $this;
  1640.     }
  1641.     public function removeSearchHistory(SearchHistory $searchHistory): self
  1642.     {
  1643.         if ($this->searchHistories->removeElement($searchHistory)) {
  1644.             // set the owning side to null (unless already changed)
  1645.             if ($searchHistory->getUser() === $this) {
  1646.                 $searchHistory->setUser(null);
  1647.             }
  1648.         }
  1649.         return $this;
  1650.     }
  1651.     public function getLastTypeLivraison(): ?IctusTypeLivraison
  1652.     {
  1653.         return $this->lastTypeLivraison;
  1654.     }
  1655.     public function setLastTypeLivraison(?IctusTypeLivraison $lastTypeLivraison): self
  1656.     {
  1657.         $this->lastTypeLivraison $lastTypeLivraison;
  1658.         return $this;
  1659.     }
  1660.     public function getLastTypePaiement(): ?IctusTypePaiement
  1661.     {
  1662.         return $this->lastTypePaiement;
  1663.     }
  1664.     public function setLastTypePaiement(?IctusTypePaiement $lastTypePaiement): self
  1665.     {
  1666.         $this->lastTypePaiement $lastTypePaiement;
  1667.         return $this;
  1668.     }
  1669.     /**
  1670.      * @return Collection<int, RemiseUserPharmacie>
  1671.      */
  1672.     public function getRemiseUserPharmacies(): Collection
  1673.     {
  1674.         return $this->remiseUserPharmacies;
  1675.     }
  1676.     public function addRemiseUserPharmacy(RemiseUserPharmacie $remiseUserPharmacy): self
  1677.     {
  1678.         if (!$this->remiseUserPharmacies->contains($remiseUserPharmacy)) {
  1679.             $this->remiseUserPharmacies[] = $remiseUserPharmacy;
  1680.             $remiseUserPharmacy->setUser($this);
  1681.         }
  1682.         return $this;
  1683.     }
  1684.     public function removeRemiseUserPharmacy(RemiseUserPharmacie $remiseUserPharmacy): self
  1685.     {
  1686.         if ($this->remiseUserPharmacies->removeElement($remiseUserPharmacy)) {
  1687.             // set the owning side to null (unless already changed)
  1688.             if ($remiseUserPharmacy->getUser() === $this) {
  1689.                 $remiseUserPharmacy->setUser(null);
  1690.             }
  1691.         }
  1692.     }
  1693.     public function getFcmToken(): ?string
  1694.     {
  1695.         return $this->fcm_token;
  1696.     }
  1697.     public function setFcmToken(?string $fcm_token): self
  1698.     {
  1699.         $this->fcm_token $fcm_token;
  1700.         return $this;
  1701.     }
  1702.     public function isIsRemiseAuto(): ?bool
  1703.     {
  1704.         return $this->isRemiseAuto;
  1705.     }
  1706.     public function setIsRemiseAuto(?bool $isRemiseAuto): self
  1707.     {
  1708.         $this->isRemiseAuto $isRemiseAuto;
  1709.         return $this;
  1710.     }
  1711.     /**
  1712.      * @return Collection<int, Parrainage>
  1713.      */
  1714.     public function getParrainages(): Collection
  1715.     {
  1716.         return $this->parrainages;
  1717.     }
  1718.     public function addParrainage(Parrainage $parrainage): self
  1719.     {
  1720.         if (!$this->parrainages->contains($parrainage)) {
  1721.             $this->parrainages[] = $parrainage;
  1722.             $parrainage->setUser($this);
  1723.         }
  1724.         return $this;
  1725.     }
  1726.     public function removeParrainage(Parrainage $parrainage): self
  1727.     {
  1728.         if ($this->parrainages->removeElement($parrainage)) {
  1729.             // set the owning side to null (unless already changed)
  1730.             if ($parrainage->getUser() === $this) {
  1731.                 $parrainage->setUser(null);
  1732.             }
  1733.         }
  1734.         return $this;
  1735.     }
  1736.     /**
  1737.      * @return Collection<int, Favorite>
  1738.      */
  1739.     public function getFavorites(): Collection
  1740.     {
  1741.         return $this->favorites;
  1742.     }
  1743.     public function addFavorite(Favorite $favorite): self
  1744.     {
  1745.         if (!$this->favorites->contains($favorite)) {
  1746.             $this->favorites[] = $favorite;
  1747.             $favorite->setUser($this);
  1748.         }
  1749.         return $this;
  1750.     }
  1751.     public function removeFavorite(Favorite $favorite): self
  1752.     {
  1753.         if ($this->favorites->removeElement($favorite)) {
  1754.             // set the owning side to null (unless already changed)
  1755.             if ($favorite->getUser() === $this) {
  1756.                 $favorite->setUser(null);
  1757.             }
  1758.         }
  1759.         return $this;
  1760.     }
  1761. }