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