src/Entity/User.php line 28

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