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