src/Entity/User.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\UserRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
  9. use Symfony\Component\Security\Core\User\UserInterface;
  10. use Symfony\Component\Validator\Constraints\Cascade;
  11. #[ORM\Entity(repositoryClassUserRepository::class)]
  12. class User implements UserInterfacePasswordAuthenticatedUserInterface
  13. {
  14.     #[ORM\Id]
  15.     #[ORM\GeneratedValue]
  16.     #[ORM\Column(type'integer')]
  17.     private $id;
  18.     #[ORM\Column(type'string'length180uniquetrue)]
  19.     private $email;
  20.     #[ORM\Column(type'json')]
  21.     private $roles = [];
  22.     #[ORM\Column(type'string'nullabletrue)]
  23.     private $password;
  24.     #[ORM\Column(type'string'length255nullabletrue)]
  25.     private $lastname;
  26.     #[ORM\Column(type'string'length255nullabletrue)]
  27.     private $firstname;
  28.     #[ORM\Column(type'boolean')]
  29.     private $is_active;
  30.     #[ORM\Column(type'boolean')]
  31.     private $is_optin;
  32.     #[ORM\Column(type'string'length255nullabletrue)]
  33.     private $token null;
  34.     #[ORM\Column(type'datetime_immutable')]
  35.     private $created_at;
  36.     #[ORM\Column(type'boolean')]
  37.     private $is_dark_mode;
  38.     #[ORM\OneToMany(mappedBy'user'targetEntityUserLog::class)]
  39.     private $userLogs;
  40.     #[ORM\Column(type'string'length255nullabletrue)]
  41.     private $telephone;
  42.     #[ORM\Column(type'string'length255nullabletrue)]
  43.     private $adeli;
  44.     #[ORM\Column(type'string'length255nullabletrue)]
  45.     private $adresse;
  46.     #[ORM\Column(type'string'length255nullabletrue)]
  47.     private $complementAdresse;
  48.     #[ORM\Column(type'string'nullabletrue)]
  49.     private $zip;
  50.     #[ORM\Column(type'string'length255nullabletrue)]
  51.     private $ville;
  52.     #[ORM\Column(type'string'length255nullabletrue)]
  53.     private $siret;
  54.     #[ORM\Column(type'array'nullabletrue)]
  55.     private $asso;
  56.     #[ORM\Column(type'string'length255nullabletrue)]
  57.     private $diplome;
  58.     #[ORM\Column(type'array'nullabletrue)]
  59.     private $specialite = [];
  60.     #[ORM\Column(type'string'length255nullabletrue)]
  61.     private $anneeDiplome;
  62.     #[ORM\Column(type'string'length255nullabletrue)]
  63.     private $statuts;
  64.     #[ORM\Column(type'string'length255nullabletrue)]
  65.     private $asso_autre;
  66.     #[ORM\Column(type'date'nullabletrue)]
  67.     private $naissance;
  68.     #[ORM\OneToMany(mappedBy'user'targetEntityAbonnement::class)]
  69.     private $abonnements;
  70.     #[ORM\ManyToMany(targetEntityPraticien::class, inversedBy'users')]
  71.     private $Praticiens;
  72.     #[ORM\OneToMany(mappedBy'user'targetEntitySubscription::class)]
  73.     private Collection $subscriptions;
  74.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  75.     private ?string $registerToken null;
  76.     #[ORM\Column(length255nullabletrue)]
  77.     private ?string $profil null;
  78.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  79.     private ?string $data null;
  80.     #[ORM\ManyToMany(targetEntityPrescription::class, inversedBy'users')]
  81.     private Collection $prescriptions;
  82.     #[ORM\OneToMany(mappedBy'user'targetEntityConsultation::class)]
  83.     private Collection $consultations;
  84.     #[ORM\ManyToOne(targetEntityself::class, inversedBy'medecins')]
  85.     private ?self $medecin null;
  86.     #[ORM\OneToMany(mappedBy'medecin'targetEntityself::class)]
  87.     private Collection $medecins;
  88.     #[ORM\Column(length255nullabletrue)]
  89.     private ?string $diplome_copy null;
  90.     #[ORM\Column(length255nullabletrue)]
  91.     private ?string $adeli_certif null;
  92.     #[ORM\ManyToOne(inversedBy'users')]
  93.     private ?DataStatus $status null;
  94.     #[ORM\Column(length255nullabletrue)]
  95.     private ?string $stripe_id null;
  96.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  97.     private ?string $comment null;
  98.     #[ORM\Column]
  99.     private ?bool $optinContact null;
  100.     #[ORM\Column]
  101.     private ?bool $optinConsentement null;
  102.     #[ORM\Column(typeTypes::DATE_MUTABLEnullabletrue)]
  103.     private ?\DateTimeInterface $optinConsentementDate null;
  104.     #[ORM\OneToMany(mappedBy'user'targetEntityPraticien::class)]
  105.     private Collection $praticiens;
  106.     #[ORM\Column(length255nullabletrue)]
  107.     private ?string $family null;
  108.     #[ORM\Column(nullabletrue)]
  109.     private ?bool $children null;
  110.     #[ORM\Column(length255nullabletrue)]
  111.     private ?string $nb_child null;
  112.     #[ORM\Column(length255nullabletrue)]
  113.     private ?string $job null;
  114.     #[ORM\Column(length255nullabletrue)]
  115.     private ?string $job_detail null;
  116.     #[ORM\Column(length255nullabletrue)]
  117.     private ?string $schedules null;
  118.     #[ORM\Column(length255nullabletrue)]
  119.     private ?string $gender null;
  120.     #[ORM\OneToMany(mappedBy'patient'targetEntityDocumentPatient::class)]
  121.     private Collection $documents;
  122.     #[ORM\Column(nullabletrue)]
  123.     private ?\DateTimeImmutable $deleteAccountAt null;
  124.     #[ORM\Column(length255nullabletrue)]
  125.     private ?string $logo null;
  126.     #[ORM\Column(length255nullabletrue)]
  127.     private ?string $country null;
  128.     #[ORM\Column(length255nullabletrue)]
  129.     private ?string $office null;
  130.     #[ORM\OneToMany(mappedBy'user'targetEntityQuestionnairePatient::class, cascade: ["persist""remove"])]
  131.     private Collection $questionnairesPatient;
  132.     #[ORM\Column(length255nullabletrue)]
  133.     private ?string $specialite_autre null;
  134.     #[ORM\OneToMany(mappedBy'patient'targetEntityNoteHonoraire::class)]
  135.     private Collection $notesHonoraires;
  136.     #[ORM\Column(length255nullabletrue)]
  137.     private ?string $signature null;
  138.     #[ORM\OneToMany(mappedBy'patient'targetEntityDocumentSaved::class)]
  139.     private Collection $documentSaveds;
  140.     #[ORM\OneToMany(mappedBy'patient'targetEntityDocumentUploaded::class)]
  141.     private Collection $documentUploadeds;
  142.     #[ORM\Column(length255nullabletrue)]
  143.     private ?string $website null;
  144.     #[ORM\Column(length255nullabletrue)]
  145.     private ?string $price_number null;
  146.     #[ORM\Column(length255nullabletrue)]
  147.     private ?string $price_letter null;
  148.     #[ORM\Column(type'text'nullabletrue)]
  149.     private ?string $notes null;
  150.     #[ORM\Column(length255nullabletrue)]
  151.     private ?string $price_number_2 null;
  152.     #[ORM\Column(length255nullabletrue)]
  153.     private ?string $price_letter_2 null;
  154.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  155.     private ?string $notePraticien null;
  156.     public function __construct()
  157.     {
  158.         $this->userLogs = new ArrayCollection();
  159.         $this->abonnements = new ArrayCollection();
  160.         $this->Praticiens = new ArrayCollection();
  161.         $this->subscriptions = new ArrayCollection();
  162.         $this->prescriptions = new ArrayCollection();
  163.         $this->consultations = new ArrayCollection();
  164.         $this->medecins = new ArrayCollection();
  165.         $this->praticiens = new ArrayCollection();
  166.         $this->documents = new ArrayCollection();
  167.         $this->questionnaires = new ArrayCollection();
  168.         $this->questionnairesPatient = new ArrayCollection();
  169.         $this->notesHonoraires = new ArrayCollection();
  170.         $this->documentSaveds = new ArrayCollection();
  171.         $this->documentUploadeds = new ArrayCollection();
  172.     }
  173.     public function getId(): ?int
  174.     {
  175.         return $this->id;
  176.     }
  177.     public function getEmail(): ?string
  178.     {
  179.         return $this->email;
  180.     }
  181.     public function setEmail(string $email): self
  182.     {
  183.         $this->email $email;
  184.         return $this;
  185.     }
  186.     /**
  187.      * A visual identifier that represents this user.
  188.      *
  189.      * @see UserInterface
  190.      */
  191.     public function getUserIdentifier(): string
  192.     {
  193.         return (string) $this->email;
  194.     }
  195.     /**
  196.      * @see UserInterface
  197.      */
  198.     public function getRoles(): array
  199.     {
  200.         $roles $this->roles;
  201.         // guarantee every user at least has ROLE_USER & ROLE_PATIENT
  202.         $roles[] = 'ROLE_USER';
  203.         return array_unique($roles);
  204.     }
  205.     public function setRoles(array $roles): self
  206.     {
  207.         $this->roles $roles;
  208.         return $this;
  209.     }
  210.     /**
  211.      * @see PasswordAuthenticatedUserInterface
  212.      */
  213.     public function getPassword(): ?string
  214.     {
  215.         return $this->password;
  216.     }
  217.     public function setPassword(?string $password): self
  218.     {
  219.         $this->password $password;
  220.         return $this;
  221.     }
  222.     /**
  223.      * @see UserInterface
  224.      */
  225.     public function eraseCredentials()
  226.     {
  227.         // If you store any temporary, sensitive data on the user, clear it here
  228.         // $this->plainPassword = null;
  229.     }
  230.     public function getLastname(): ?string
  231.     {
  232.         return $this->lastname;
  233.     }
  234.     public function setLastname(?string $lastname): self
  235.     {
  236.         $this->lastname $lastname;
  237.         return $this;
  238.     }
  239.     public function getFirstname(): ?string
  240.     {
  241.         return $this->firstname;
  242.     }
  243.     public function setFirstname(?string $firstname): self
  244.     {
  245.         $this->firstname $firstname;
  246.         return $this;
  247.     }
  248.     public function getIsActive(): ?bool
  249.     {
  250.         return $this->is_active;
  251.     }
  252.     public function setIsActive(bool $is_active): self
  253.     {
  254.         $this->is_active $is_active;
  255.         return $this;
  256.     }
  257.     public function getIsOptin(): ?bool
  258.     {
  259.         return $this->is_optin;
  260.     }
  261.     public function setIsOptin(bool $is_optin): self
  262.     {
  263.         $this->is_optin $is_optin;
  264.         return $this;
  265.     }
  266.     public function getToken(): ?string
  267.     {
  268.         return $this->token;
  269.     }
  270.     public function setToken(?string $token): self
  271.     {
  272.         $this->token $token;
  273.         return $this;
  274.     }
  275.     public function getCreatedAt(): ?\DateTimeImmutable
  276.     {
  277.         return $this->created_at;
  278.     }
  279.     public function setCreatedAt(\DateTimeImmutable $created_at): self
  280.     {
  281.         $this->created_at $created_at;
  282.         return $this;
  283.     }
  284.     public function getIsDarkMode(): ?bool
  285.     {
  286.         return $this->is_dark_mode;
  287.     }
  288.     public function setIsDarkMode(bool $is_dark_mode): self
  289.     {
  290.         $this->is_dark_mode $is_dark_mode;
  291.         return $this;
  292.     }
  293.     /**
  294.      * @return Collection<int, UserLog>
  295.      */
  296.     public function getUserLogs(): Collection
  297.     {
  298.         return $this->userLogs;
  299.     }
  300.     public function addUserLog(UserLog $userLog): self
  301.     {
  302.         if (!$this->userLogs->contains($userLog)) {
  303.             $this->userLogs[] = $userLog;
  304.             $userLog->setUser($this);
  305.         }
  306.         return $this;
  307.     }
  308.     public function removeUserLog(UserLog $userLog): self
  309.     {
  310.         if ($this->userLogs->removeElement($userLog)) {
  311.             // set the owning side to null (unless already changed)
  312.             if ($userLog->getUser() === $this) {
  313.                 $userLog->setUser(null);
  314.             }
  315.         }
  316.         return $this;
  317.     }
  318.     public function isIsActive(): ?bool
  319.     {
  320.         return $this->is_active;
  321.     }
  322.     public function isIsOptin(): ?bool
  323.     {
  324.         return $this->is_optin;
  325.     }
  326.     public function isIsDarkMode(): ?bool
  327.     {
  328.         return $this->is_dark_mode;
  329.     }
  330.     public function getTelephone(): ?string
  331.     {
  332.         return $this->telephone;
  333.     }
  334.     public function setTelephone(?string $telephone): self
  335.     {
  336.         $this->telephone $telephone;
  337.         return $this;
  338.     }
  339.     public function getAdeli(): ?string
  340.     {
  341.         return $this->adeli;
  342.     }
  343.     public function setAdeli(string $adeli): self
  344.     {
  345.         $this->adeli $adeli;
  346.         return $this;
  347.     }
  348.     public function getAdresse(): ?string
  349.     {
  350.         return $this->adresse;
  351.     }
  352.     public function setAdresse(?string $adresse): self
  353.     {
  354.         $this->adresse $adresse;
  355.         return $this;
  356.     }
  357.     public function getComplementAdresse(): ?string
  358.     {
  359.         return $this->complementAdresse;
  360.     }
  361.     public function setComplementAdresse(?string $complementAdresse): self
  362.     {
  363.         $this->complementAdresse $complementAdresse;
  364.         return $this;
  365.     }
  366.     public function getZip(): ?string
  367.     {
  368.         return $this->zip;
  369.     }
  370.     public function setZip(?string $zip): self
  371.     {
  372.         $this->zip $zip;
  373.         return $this;
  374.     }
  375.     public function getVille(): ?string
  376.     {
  377.         return $this->ville;
  378.     }
  379.     public function setVille(?string $ville): self
  380.     {
  381.         $this->ville $ville;
  382.         return $this;
  383.     }
  384.     public function getSiret(): ?string
  385.     {
  386.         return $this->siret;
  387.     }
  388.     public function setSiret(?string $siret): self
  389.     {
  390.         $this->siret $siret;
  391.         return $this;
  392.     }
  393.     public function getAsso(): ?array
  394.     {
  395.         return $this->asso;
  396.     }
  397.     public function setAsso(?array $asso): self
  398.     {
  399.         $this->asso $asso;
  400.         return $this;
  401.     }
  402.     public function getDiplome(): ?string
  403.     {
  404.         return $this->diplome;
  405.     }
  406.     public function setDiplome(?string $diplome): self
  407.     {
  408.         $this->diplome $diplome;
  409.         return $this;
  410.     }
  411.     public function getSpecialite(): ?array
  412.     {
  413.         return $this->specialite;
  414.     }
  415.     public function setSpecialite(?array $specialite): self
  416.     {
  417.         $this->specialite $specialite;
  418.         return $this;
  419.     }
  420.     public function getAnneeDiplome(): ?string
  421.     {
  422.         return $this->anneeDiplome;
  423.     }
  424.     public function setAnneeDiplome(?string $anneeDiplome): self
  425.     {
  426.         $this->anneeDiplome $anneeDiplome;
  427.         return $this;
  428.     }
  429.     public function getStatuts(): ?string
  430.     {
  431.         return $this->statuts;
  432.     }
  433.     public function setStatuts(?string $statuts): self
  434.     {
  435.         $this->statuts $statuts;
  436.         return $this;
  437.     }
  438.     public function getAssoAutre(): ?string
  439.     {
  440.         return $this->asso_autre;
  441.     }
  442.     public function setAssoAutre(?string $asso_autre): self
  443.     {
  444.         $this->asso_autre $asso_autre;
  445.         return $this;
  446.     }
  447.     public function getNaissance(): ?\DateTimeInterface
  448.     {
  449.         return $this->naissance;
  450.     }
  451.     public function setNaissance(?\DateTimeInterface $naissance): self
  452.     {
  453.         $this->naissance $naissance;
  454.         return $this;
  455.     }
  456.     /**
  457.      * @return Collection<int, Abonnement>
  458.      */
  459.     public function getAbonnements(): Collection
  460.     {
  461.         return $this->abonnements;
  462.     }
  463.     public function addAbonnement(Abonnement $abonnement): self
  464.     {
  465.         if (!$this->abonnements->contains($abonnement)) {
  466.             $this->abonnements[] = $abonnement;
  467.             $abonnement->setUser($this);
  468.         }
  469.         return $this;
  470.     }
  471.     public function removeAbonnement(Abonnement $abonnement): self
  472.     {
  473.         if ($this->abonnements->removeElement($abonnement)) {
  474.             // set the owning side to null (unless already changed)
  475.             if ($abonnement->getUser() === $this) {
  476.                 $abonnement->setUser(null);
  477.             }
  478.         }
  479.         return $this;
  480.     }
  481.     /**
  482.      * @return Collection<int, Subscription>
  483.      */
  484.     public function getSubscriptions(): Collection
  485.     {
  486.         return $this->subscriptions;
  487.     }
  488.     public function addSubscription(Subscription $subscription): static
  489.     {
  490.         if (!$this->subscriptions->contains($subscription)) {
  491.             $this->subscriptions->add($subscription);
  492.             $subscription->setUser($this);
  493.         }
  494.         return $this;
  495.     }
  496.     public function removeSubscription(Subscription $subscription): static
  497.     {
  498.         if ($this->subscriptions->removeElement($subscription)) {
  499.             // set the owning side to null (unless already changed)
  500.             if ($subscription->getUser() === $this) {
  501.                 $subscription->setUser(null);
  502.             }
  503.         }
  504.         return $this;
  505.     }
  506.     public function getRegisterToken(): ?string
  507.     {
  508.         return $this->registerToken;
  509.     }
  510.     public function setRegisterToken(?string $registerToken): static
  511.     {
  512.         $this->registerToken $registerToken;
  513.         return $this;
  514.     }
  515.     public function getProfil(): ?string
  516.     {
  517.         return $this->profil;
  518.     }
  519.     public function setProfil(?string $profil): static
  520.     {
  521.         $this->profil $profil;
  522.         return $this;
  523.     }
  524.     public function getData(): ?string
  525.     {
  526.         return $this->data;
  527.     }
  528.     public function setData(?string $data): static
  529.     {
  530.         $this->data $data;
  531.         return $this;
  532.     }
  533.     /**
  534.      * @return Collection<int, Prescription>
  535.      */
  536.     public function getPrescriptions(): Collection
  537.     {
  538.         return $this->prescriptions;
  539.     }
  540.     public function addPrescription(Prescription $prescription): static
  541.     {
  542.         if (!$this->prescriptions->contains($prescription)) {
  543.             $this->prescriptions->add($prescription);
  544.         }
  545.         return $this;
  546.     }
  547.     public function removePrescription(Prescription $prescription): static
  548.     {
  549.         $this->prescriptions->removeElement($prescription);
  550.         return $this;
  551.     }
  552.     /**
  553.      * @return Collection<int, Consultation>
  554.      */
  555.     public function getConsultations(): Collection
  556.     {
  557.         return $this->consultations;
  558.     }
  559.     public function addConsultation(Consultation $consultation): static
  560.     {
  561.         if (!$this->consultations->contains($consultation)) {
  562.             $this->consultations->add($consultation);
  563.             $consultation->setUser($this);
  564.         }
  565.         return $this;
  566.     }
  567.     public function removeConsultation(Consultation $consultation): static
  568.     {
  569.         if ($this->consultations->removeElement($consultation)) {
  570.             // set the owning side to null (unless already changed)
  571.             if ($consultation->getUser() === $this) {
  572.                 $consultation->setUser(null);
  573.             }
  574.         }
  575.         return $this;
  576.     }
  577.     public function getMedecin(): ?self
  578.     {
  579.         return $this->medecin;
  580.     }
  581.     public function setMedecin(?self $medecin): static
  582.     {
  583.         $this->medecin $medecin;
  584.         return $this;
  585.     }
  586.     /**
  587.      * @return Collection<int, self>
  588.      */
  589.     public function getMedecins(): Collection
  590.     {
  591.         return $this->medecins;
  592.     }
  593.     public function addMedecin(self $medecin): static
  594.     {
  595.         if (!$this->medecins->contains($medecin)) {
  596.             $this->medecins->add($medecin);
  597.             $medecin->setMedecin($this);
  598.         }
  599.         return $this;
  600.     }
  601.     public function removeMedecin(self $medecin): static
  602.     {
  603.         if ($this->medecins->removeElement($medecin)) {
  604.             // set the owning side to null (unless already changed)
  605.             if ($medecin->getMedecin() === $this) {
  606.                 $medecin->setMedecin(null);
  607.             }
  608.         }
  609.         return $this;
  610.     }
  611.     public function getDiplomeCopy(): ?string
  612.     {
  613.         return $this->diplome_copy;
  614.     }
  615.     public function setDiplomeCopy(?string $diplome_copy): static
  616.     {
  617.         $this->diplome_copy $diplome_copy;
  618.         return $this;
  619.     }
  620.     public function getAdeliCertif(): ?string
  621.     {
  622.         return $this->adeli_certif;
  623.     }
  624.     public function setAdeliCertif(?string $adeli_certif): static
  625.     {
  626.         $this->adeli_certif $adeli_certif;
  627.         return $this;
  628.     }
  629.     public function getStatus(): ?DataStatus
  630.     {
  631.         return $this->status;
  632.     }
  633.     public function setStatus(?DataStatus $status): static
  634.     {
  635.         $this->status $status;
  636.         return $this;
  637.     }
  638.     public function getStripeId(): ?string
  639.     {
  640.         return $this->stripe_id;
  641.     }
  642.     public function setStripeId(?string $stripe_id): static
  643.     {
  644.         $this->stripe_id $stripe_id;
  645.         return $this;
  646.     }
  647.     public function getComment(): ?string
  648.     {
  649.         return $this->comment;
  650.     }
  651.     public function setComment(?string $comment): static
  652.     {
  653.         $this->comment $comment;
  654.         return $this;
  655.     }
  656.     public function isOptinContact(): ?bool
  657.     {
  658.         return $this->optinContact;
  659.     }
  660.     public function setOptinContact(bool $optinContact): static
  661.     {
  662.         $this->optinContact $optinContact;
  663.         return $this;
  664.     }
  665.     public function isOptinConsentement(): ?bool
  666.     {
  667.         return $this->optinConsentement;
  668.     }
  669.     public function setOptinConsentement(bool $optinConsentement): static
  670.     {
  671.         $this->optinConsentement $optinConsentement;
  672.         return $this;
  673.     }
  674.     public function getOptinConsentementDate(): ?\DateTimeInterface
  675.     {
  676.         return $this->optinConsentementDate;
  677.     }
  678.     public function setOptinConsentementDate(?\DateTimeInterface $optinConsentementDate): static
  679.     {
  680.         $this->optinConsentementDate $optinConsentementDate;
  681.         return $this;
  682.     }
  683.     /**
  684.      * @return Collection<int, Praticien>
  685.      */
  686.     public function getPraticiens(): Collection
  687.     {
  688.         return $this->praticiens;
  689.     }
  690.     public function addPraticien(Praticien $praticien): static
  691.     {
  692.         if (!$this->praticiens->contains($praticien)) {
  693.             $this->praticiens->add($praticien);
  694.             $praticien->setUser($this);
  695.         }
  696.         return $this;
  697.     }
  698.     public function removePraticien(Praticien $praticien): static
  699.     {
  700.         if ($this->praticiens->removeElement($praticien)) {
  701.             // set the owning side to null (unless already changed)
  702.             if ($praticien->getUser() === $this) {
  703.                 $praticien->setUser(null);
  704.             }
  705.         }
  706.         return $this;
  707.     }
  708.     public function getFamily(): ?string
  709.     {
  710.         return $this->family;
  711.     }
  712.     public function setFamily(?string $family): static
  713.     {
  714.         $this->family $family;
  715.         return $this;
  716.     }
  717.     public function isChildren(): ?bool
  718.     {
  719.         return $this->children;
  720.     }
  721.     public function setChildren(?bool $children): static
  722.     {
  723.         $this->children $children;
  724.         return $this;
  725.     }
  726.     public function getNbChild(): ?string
  727.     {
  728.         return $this->nb_child;
  729.     }
  730.     public function setNbChild(?string $nb_child): static
  731.     {
  732.         $this->nb_child $nb_child;
  733.         return $this;
  734.     }
  735.     public function getJob(): ?string
  736.     {
  737.         return $this->job;
  738.     }
  739.     public function setJob(?string $job): static
  740.     {
  741.         $this->job $job;
  742.         return $this;
  743.     }
  744.     public function getJobDetail(): ?string
  745.     {
  746.         return $this->job_detail;
  747.     }
  748.     public function setJobDetail(?string $job_detail): static
  749.     {
  750.         $this->job_detail $job_detail;
  751.         return $this;
  752.     }
  753.     public function getSchedules(): ?string
  754.     {
  755.         return $this->schedules;
  756.     }
  757.     public function setSchedules(?string $schedules): static
  758.     {
  759.         $this->schedules $schedules;
  760.         return $this;
  761.     }
  762.     public function getGender(): ?string
  763.     {
  764.         return $this->gender;
  765.     }
  766.     public function setGender(?string $gender): static
  767.     {
  768.         $this->gender $gender;
  769.         return $this;
  770.     }
  771.     /**
  772.      * @return Collection<int, DocumentPatient>
  773.      */
  774.     public function getDocuments(): Collection
  775.     {
  776.         return $this->documents;
  777.     }
  778.     public function addDocument(DocumentPatient $document): static
  779.     {
  780.         if (!$this->documents->contains($document)) {
  781.             $this->documents->add($document);
  782.             $document->setPatient($this);
  783.         }
  784.         return $this;
  785.     }
  786.     public function removeDocument(DocumentPatient $document): static
  787.     {
  788.         if ($this->documents->removeElement($document)) {
  789.             // set the owning side to null (unless already changed)
  790.             if ($document->getPatient() === $this) {
  791.                 $document->setPatient(null);
  792.             }
  793.         }
  794.         return $this;
  795.     }
  796.     public function getDeleteAccountAt(): ?\DateTimeImmutable
  797.     {
  798.         return $this->deleteAccountAt;
  799.     }
  800.     public function setDeleteAccountAt(?\DateTimeImmutable $deleteAccountAt): static
  801.     {
  802.         $this->deleteAccountAt $deleteAccountAt;
  803.         return $this;
  804.     }
  805.     public function getLogo(): ?string
  806.     {
  807.         return $this->logo;
  808.     }
  809.     public function setLogo(?string $logo): static
  810.     {
  811.         $this->logo $logo;
  812.         return $this;
  813.     }
  814.     public function getCountry(): ?string
  815.     {
  816.         return $this->country;
  817.     }
  818.     public function setCountry(?string $country): static
  819.     {
  820.         $this->country $country;
  821.         return $this;
  822.     }
  823.     public function getOffice(): ?string
  824.     {
  825.         return $this->office;
  826.     }
  827.     public function setOffice(?string $office): static
  828.     {
  829.         $this->office $office;
  830.         return $this;
  831.     }
  832.     /**
  833.      * @return Collection<int, QuestionnairePatient>
  834.      */
  835.     public function getQuestionnairesPatient(): Collection
  836.     {
  837.         return $this->questionnairesPatient;
  838.     }
  839.     public function addQuestionnairesPatient(QuestionnairePatient $questionnairesPatient): static
  840.     {
  841.         if (!$this->questionnairesPatient->contains($questionnairesPatient)) {
  842.             $this->questionnairesPatient->add($questionnairesPatient);
  843.             $questionnairesPatient->setUser($this);
  844.         }
  845.         return $this;
  846.     }
  847.     public function removeQuestionnairesPatient(QuestionnairePatient $questionnairesPatient): static
  848.     {
  849.         if ($this->questionnairesPatient->removeElement($questionnairesPatient)) {
  850.             // set the owning side to null (unless already changed)
  851.             if ($questionnairesPatient->getUser() === $this) {
  852.                 $questionnairesPatient->setUser(null);
  853.             }
  854.         }
  855.         return $this;
  856.     }
  857.     public function getSpecialiteAutre(): ?string
  858.     {
  859.         return $this->specialite_autre;
  860.     }
  861.     public function setSpecialiteAutre(?string $specialite_autre): static
  862.     {
  863.         $this->specialite_autre $specialite_autre;
  864.         return $this;
  865.     }
  866.     /**
  867.      * @return Collection<int, NoteHonoraire>
  868.      */
  869.     public function getNotesHonoraires(): Collection
  870.     {
  871.         return $this->notesHonoraires;
  872.     }
  873.     public function addNotesHonoraire(NoteHonoraire $notesHonoraire): static
  874.     {
  875.         if (!$this->notesHonoraires->contains($notesHonoraire)) {
  876.             $this->notesHonoraires->add($notesHonoraire);
  877.             $notesHonoraire->setPatient($this);
  878.         }
  879.         return $this;
  880.     }
  881.     public function removeNotesHonoraire(NoteHonoraire $notesHonoraire): static
  882.     {
  883.         if ($this->notesHonoraires->removeElement($notesHonoraire)) {
  884.             // set the owning side to null (unless already changed)
  885.             if ($notesHonoraire->getPatient() === $this) {
  886.                 $notesHonoraire->setPatient(null);
  887.             }
  888.         }
  889.         return $this;
  890.     }
  891.     public function getSignature(): ?string
  892.     {
  893.         return $this->signature;
  894.     }
  895.     public function setSignature(?string $signature): static
  896.     {
  897.         $this->signature $signature;
  898.         return $this;
  899.     }
  900.     /**
  901.      * @return Collection<int, DocumentSaved>
  902.      */
  903.     public function getDocumentSaveds(): Collection
  904.     {
  905.         return $this->documentSaveds;
  906.     }
  907.     public function addDocumentSaved(DocumentSaved $documentSaved): static
  908.     {
  909.         if (!$this->documentSaveds->contains($documentSaved)) {
  910.             $this->documentSaveds->add($documentSaved);
  911.             $documentSaved->setPatient($this);
  912.         }
  913.         return $this;
  914.     }
  915.     public function removeDocumentSaved(DocumentSaved $documentSaved): static
  916.     {
  917.         if ($this->documentSaveds->removeElement($documentSaved)) {
  918.             // set the owning side to null (unless already changed)
  919.             if ($documentSaved->getPatient() === $this) {
  920.                 $documentSaved->setPatient(null);
  921.             }
  922.         }
  923.         return $this;
  924.     }
  925.     /**
  926.      * @return Collection<int, DocumentUploaded>
  927.      */
  928.     public function getDocumentUploadeds(): Collection
  929.     {
  930.         return $this->documentUploadeds;
  931.     }
  932.     public function addDocumentUploaded(DocumentUploaded $documentUploaded): static
  933.     {
  934.         if (!$this->documentUploadeds->contains($documentUploaded)) {
  935.             $this->documentUploadeds->add($documentUploaded);
  936.             $documentUploaded->setPatient($this);
  937.         }
  938.         return $this;
  939.     }
  940.     public function removeDocumentUploaded(DocumentUploaded $documentUploaded): static
  941.     {
  942.         if ($this->documentUploadeds->removeElement($documentUploaded)) {
  943.             // set the owning side to null (unless already changed)
  944.             if ($documentUploaded->getPatient() === $this) {
  945.                 $documentUploaded->setPatient(null);
  946.             }
  947.         }
  948.         return $this;
  949.     }
  950.     public function getWebsite(): ?string
  951.     {
  952.         return $this->website;
  953.     }
  954.     public function setWebsite(?string $website): static
  955.     {
  956.         $this->website $website;
  957.         return $this;
  958.     }
  959.     public function getPriceNumber(): ?string
  960.     {
  961.         return $this->price_number;
  962.     }
  963.     public function setPriceNumber(string $price_number): static
  964.     {
  965.         $this->price_number $price_number;
  966.         return $this;
  967.     }
  968.     public function getPriceLetter(): ?string
  969.     {
  970.         return $this->price_letter;
  971.     }
  972.     public function setPriceLetter(string $price_letter): static
  973.     {
  974.         $this->price_letter $price_letter;
  975.         return $this;
  976.     }
  977.     public function getNotes(): ?string
  978.     {
  979.         return $this->notes;
  980.     }
  981.     public function setNotes(?string $notes): static
  982.     {
  983.         $this->notes $notes;
  984.         return $this;
  985.     }
  986.     public function getPriceNumber2(): ?string
  987.     {
  988.         return $this->price_number_2;
  989.     }
  990.     public function setPriceNumber2(?string $price_number_2): static
  991.     {
  992.         $this->price_number_2 $price_number_2;
  993.         return $this;
  994.     }
  995.     public function getPriceLetter2(): ?string
  996.     {
  997.         return $this->price_letter_2;
  998.     }
  999.     public function setPriceLetter2(?string $price_letter_2): static
  1000.     {
  1001.         $this->price_letter_2 $price_letter_2;
  1002.         return $this;
  1003.     }
  1004.     public function getNotePraticien(): ?string
  1005.     {
  1006.         return $this->notePraticien;
  1007.     }
  1008.     public function setNotePraticien(?string $notePraticien): static
  1009.     {
  1010.         $this->notePraticien $notePraticien;
  1011.         return $this;
  1012.     }
  1013. // === DÉBUT MODIFICATION ROLES 2025-10-29 ===
  1014.     /**
  1015.      * Vérifie si l'utilisateur est un PRATICIEN
  1016.      * Note: CUSTOMER legacy est considéré comme PRATICIEN
  1017.      */
  1018.     public function isPraticien(): bool
  1019.     {
  1020.         return in_array('ROLE_PRATICIEN'$this->roles) ||
  1021.             (in_array('ROLE_CUSTOMER'$this->roles) &&
  1022.                 !in_array('ROLE_COACH'$this->roles) &&
  1023.                 !in_array('ROLE_PRATICIEN'$this->roles));
  1024.     }
  1025.     /**
  1026.      * Vérifie si l'utilisateur est un COACH
  1027.      */
  1028.     public function isCoach(): bool
  1029.     {
  1030.         return in_array('ROLE_COACH'$this->roles);
  1031.     }
  1032. // === FIN MODIFICATION ROLES ===
  1033. }