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