src/Entity/utilisateur/Utilisateurs.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\Entity\utilisateur;
  3. use App\Entity\api\ApiUtilisateur;
  4. use App\Entity\att\AttGroupe;
  5. use App\Entity\utilisateur\UtilisateurSociete;
  6. use App\Repository\administration\UtilisateursRepository;
  7. use Doctrine\Common\Collections\ArrayCollection;
  8. use Doctrine\Common\Collections\Collection;
  9. use Doctrine\ORM\Mapping as ORM;
  10. use Symfony\Component\Security\Core\User\UserInterface;
  11. /**
  12.  * @ORM\Entity(repositoryClass=UtilisateursRepository::class)
  13.  */
  14. class Utilisateurs implements UserInterface
  15. {
  16.     /**
  17.      * @var int
  18.      *
  19.      * @ORM\Column(name="id_utilisateur", type="bigint", nullable=false)
  20.      * @ORM\Id
  21.      * @ORM\GeneratedValue()
  22.      */
  23.     private $idUtilisateur;
  24.     /**
  25.      * @var string|null
  26.      *
  27.      * @ORM\Column(name="nom", type="string", length=50, nullable=true)
  28.      */
  29.     private $nom;
  30.     /**
  31.      * @var string|null
  32.      *
  33.      * @ORM\Column(name="prenom", type="string", length=50, nullable=true)
  34.      */
  35.     private $prenom;
  36.     /**
  37.      * @var string|null
  38.      *
  39.      * @ORM\Column(name="mail", type="string", length=255, nullable=true)
  40.      */
  41.     private $mail;
  42.     /**
  43.      * @var string|null
  44.      *
  45.      * @ORM\Column(name="fonction", type="string", length=255, nullable=true)
  46.      */
  47.     private $fonction;
  48.     /**
  49.      * @var string|null
  50.      *
  51.      * @ORM\Column(name="commentaire", type="string", length=255, nullable=true)
  52.      */
  53.     private $commentaire;
  54.     /**
  55.      * @var string|null
  56.      *
  57.      * @ORM\Column(name="identifiant", type="string", length=255, nullable=true)
  58.      */
  59.     private $identifiant;
  60.     /**
  61.      * @var string|null
  62.      *
  63.      * @ORM\Column(name="mot_de_passe", type="string", length=255, nullable=true)
  64.      */
  65.     private $motDePasse;
  66.     /**
  67.      * @var string|null
  68.      *
  69.      * @ORM\Column(name="ancien_mot_de_passe", type="string", length=255, nullable=true)
  70.      */
  71.     private $AncienMotDePasse;
  72.     /**
  73.      * @var bool
  74.      *
  75.      * @ORM\Column(name="nb_essai_avant_bloquage", type="integer", nullable=false)
  76.      */
  77.     private $nbEssaiAvantBloquage 3;
  78.     /**
  79.      * @var \DateTime|null
  80.      *
  81.      * @ORM\Column(name="date_fin_compte", type="date", nullable=true)
  82.      */
  83.     private $dateFinCompte;
  84.     /**
  85.      * @var bool
  86.      *
  87.      * @ORM\Column(name="compte_desactive", type="boolean", nullable=false)
  88.      */
  89.     private $compteDesactive '0';
  90.     /**
  91.      * @var UtilisateurSociete
  92.      *
  93.      * @ORM\ManyToOne(targetEntity=UtilisateurSociete::class)
  94.      * @ORM\JoinColumns({
  95.      *   @ORM\JoinColumn(name="fk_utilisateur_societe_id", referencedColumnName="id_utilisateur_societe")
  96.      * })
  97.      */
  98.     private $fkUtilisateurSociete;
  99.     /**
  100.      * @var UtilisateurProfil
  101.      *
  102.      * @ORM\ManyToOne(targetEntity="UtilisateurProfil", cascade={"persist"})
  103.      * @ORM\JoinColumns({
  104.      *   @ORM\JoinColumn(name="fk_utilisateur_profil_id", referencedColumnName="id_utilisateur_profil")
  105.      * })
  106.      */
  107.     private $fkUtilisateurProfil;
  108.     /**
  109.      * @var bool
  110.      *
  111.      * @ORM\Column(name="acces_memo", type="boolean", nullable=false)
  112.      */
  113.     private $accesMemo '0';
  114.     /**
  115.      * @var bool
  116.      *
  117.      * @ORM\Column(name="acces_elium", type="boolean", nullable=false)
  118.      */
  119.     private $accesElium '0';
  120.     /**
  121.     * @ORM\ManyToOne(targetEntity="App\Entity\att\AttGroupe", cascade={"persist"})
  122.     * @ORM\JoinColumns({
  123.      *   @ORM\JoinColumn(name="fk_att_groupe_id", referencedColumnName="id_att_groupe")
  124.     * })
  125.     */
  126.     private $fkAttGroupeId;
  127.     /**
  128.      * @ORM\Column(type="datetime", nullable=false)
  129.      */
  130.     private $derniereConnexion;
  131.     /**
  132.      * @var bool
  133.      *
  134.      * @ORM\Column(name="view_quick_cc", type="boolean", nullable=false)
  135.      */
  136.     private $viewQuickCc '0';
  137.     /**
  138.      * @ORM\ManyToOne(targetEntity="App\Entity\utilisateur\Utilisateurs", cascade={"persist"})
  139.      * @ORM\JoinColumns({
  140.      *   @ORM\JoinColumn(name="created_by", referencedColumnName="id_utilisateur")
  141.      * })
  142.      */
  143.     private $createdBy;
  144.     /**
  145.      * @ORM\Column(type="datetime", nullable=false)
  146.      */
  147.     private $createdAt;
  148.     /**
  149.      * @ORM\ManyToOne(targetEntity="App\Entity\utilisateur\Utilisateurs", cascade={"persist"})
  150.      * @ORM\JoinColumns({
  151.      *   @ORM\JoinColumn(name="modified_by", referencedColumnName="id_utilisateur")
  152.      * })
  153.      */
  154.     private $modifiedBy;
  155.     /**
  156.      * @ORM\Column(type="datetime", nullable=true)
  157.      */
  158.     private $modifiedAt;
  159.     /**
  160.      * @var bool
  161.      *
  162.      * @ORM\Column(name="is_verified", type="boolean", nullable=false)
  163.      */
  164.     private $isVerified 0;
  165.     public function getIdUtilisateur(): int
  166.     {
  167.         return $this->idUtilisateur;
  168.     }
  169.     public function setIdUtilisateur(int $idUtilisateur): void
  170.     {
  171.         $this->idUtilisateur $idUtilisateur;
  172.     }
  173.     public function getNom(): ?string
  174.     {
  175.         return $this->nom;
  176.     }
  177.     public function setNom(?string $nom): self
  178.     {
  179.         $this->nom $nom;
  180.         return $this;
  181.     }
  182.     public function getPrenom(): ?string
  183.     {
  184.         return $this->prenom;
  185.     }
  186.     public function setPrenom(?string $prenom): self
  187.     {
  188.         $this->prenom $prenom;
  189.         return $this;
  190.     }
  191.     public function getMail(): ?string
  192.     {
  193.         return $this->mail;
  194.     }
  195.     public function setMail(?string $mail): self
  196.     {
  197.         $this->mail $mail;
  198.         return $this;
  199.     }
  200.     public function getFonction(): ?string
  201.     {
  202.         return $this->fonction;
  203.     }
  204.     public function setFonction(?string $fonction): self
  205.     {
  206.         $this->fonction $fonction;
  207.         return $this;
  208.     }
  209.     public function getCommentaire(): ?string
  210.     {
  211.         return $this->commentaire;
  212.     }
  213.     public function setCommentaire(?string $commentaire): self
  214.     {
  215.         $this->commentaire $commentaire;
  216.         return $this;
  217.     }
  218.     public function getIdentifiant(): ?string
  219.     {
  220.         return $this->identifiant;
  221.     }
  222.     public function setIdentifiant(?string $identifiant): self
  223.     {
  224.         $this->identifiant $identifiant;
  225.         return $this;
  226.     }
  227.     public function getMotDePasse(): ?string
  228.     {
  229.         return $this->motDePasse;
  230.     }
  231.     public function setMotDePasse(?string $motDePasse): self
  232.     {
  233.         $this->motDePasse $motDePasse;
  234.         return $this;
  235.     }
  236.     public function getAncienMotDePasse(): ?string
  237.     {
  238.         return $this->AncienMotDePasse;
  239.     }
  240.     public function setAncienMotDePasse(?string $AncienMotDePasse): self
  241.     {
  242.         $this->AncienMotDePasse $AncienMotDePasse;
  243.         return $this;
  244.     }
  245.     public function getNbEssaiAvantBloquage(): ?int
  246.     {
  247.         return $this->nbEssaiAvantBloquage;
  248.     }
  249.     public function setNbEssaiAvantBloquage(int $nbEssaiAvantBloquage): self
  250.     {
  251.         $this->nbEssaiAvantBloquage $nbEssaiAvantBloquage;
  252.         return $this;
  253.     }
  254.     public function getDateFinCompte(): ?\DateTimeInterface
  255.     {
  256.         return $this->dateFinCompte;
  257.     }
  258.     public function setDateFinCompte(?\DateTimeInterface $dateFinCompte): self
  259.     {
  260.         $this->dateFinCompte $dateFinCompte;
  261.         return $this;
  262.     }
  263.     public function getCompteDesactive(): ?bool
  264.     {
  265.         return $this->compteDesactive;
  266.     }
  267.     public function setCompteDesactive(bool $compteDesactive): self
  268.     {
  269.         $this->compteDesactive $compteDesactive;
  270.         return $this;
  271.     }
  272.     public function getFkUtilisateurSociete(): ?UtilisateurSociete
  273.     {
  274.         return $this->fkUtilisateurSociete;
  275.     }
  276.     public function setFkUtilisateurSociete(?UtilisateurSociete $fkUtilisateurSociete): self
  277.     {
  278.         $this->fkUtilisateurSociete $fkUtilisateurSociete;
  279.         return $this;
  280.     }
  281.     public function getFkUtilisateurProfil(): ?UtilisateurProfil
  282.     {
  283.         return $this->fkUtilisateurProfil;
  284.     }
  285.     public function setFkUtilisateurProfil(?UtilisateurProfil $fkUtilisateurProfil): self
  286.     {
  287.         $this->fkUtilisateurProfil $fkUtilisateurProfil;
  288.         return $this;
  289.     }
  290.     public function getAccesMemo(): ?bool
  291.     {
  292.         return $this->accesMemo;
  293.     }
  294.     public function setAccesMemo(?bool $accesMemo): self
  295.     {
  296.         $this->accesElium $accesMemo;
  297.         return $this;
  298.     }
  299.     public function getAccesElium(): ?bool
  300.     {
  301.         return $this->accesElium;
  302.     }
  303.     public function setAccesElium(?bool $accesElium): self
  304.     {
  305.         $this->accesElium $accesElium;
  306.         return $this;
  307.     }
  308.     public function getFkAttGroupeId(): ?AttGroupe
  309.     {
  310.         return $this->fkAttGroupeId;
  311.     }
  312.     public function setFkAttGroupeId(?AttGroupe $fkAttGroupeId): self
  313.     {
  314.         $this->fkAttGroupeId $fkAttGroupeId;
  315.         return $this;
  316.     }
  317.     public function getDerniereConnexion(): ?\DateTimeInterface
  318.     {
  319.         return $this->derniereConnexion;
  320.     }
  321.     public function setDerniereConnexion(?\DateTimeInterface $derniereConnexion): self
  322.     {
  323.         $this->derniereConnexion $derniereConnexion;
  324.         return $this;
  325.     }
  326.     public function __toString(): string
  327.     {
  328.         return $this->getPrenom()." ".$this->getNom();
  329.     }
  330.     public function getRoles(): array
  331.     {
  332.         $roles[] = 'ROLE_USER';
  333.         return array_unique($roles);
  334.     }
  335.     public function getViewQuickCc(): ?bool
  336.     {
  337.         return $this->viewQuickCc;
  338.     }
  339.     public function setViewQuickCc(?bool $viewQuickCc): self
  340.     {
  341.         $this->viewQuickCc $viewQuickCc;
  342.         return $this;
  343.     }
  344.     public function getCreatedBy(): ?Utilisateurs
  345.     {
  346.         return $this->createdBy;
  347.     }
  348.     public function setCreatedBy(?Utilisateurs $createdBy): self
  349.     {
  350.         $this->createdBy $createdBy;
  351.         return $this;
  352.     }
  353.     public function getCreatedAt(): ?\DateTimeInterface
  354.     {
  355.         return $this->createdAt;
  356.     }
  357.     public function setCreatedAt(?\DateTimeInterface $createdAt): self
  358.     {
  359.         $this->createdAt $createdAt;
  360.         return $this;
  361.     }
  362.     public function getModifiedBy(): ?Utilisateurs
  363.     {
  364.         return $this->createdBy;
  365.     }
  366.     public function setModifiedBy(?Utilisateurs $modifiedBy): self
  367.     {
  368.         $this->modifiedBy $modifiedBy;
  369.         return $this;
  370.     }
  371.     public function getModifiedAt(): ?\DateTimeInterface
  372.     {
  373.         return $this->modifiedAt;
  374.     }
  375.     public function setModifiedAt(?\DateTimeInterface $modifiedAt): self
  376.     {
  377.         $this->modifiedAt $modifiedAt;
  378.         return $this;
  379.     }
  380.     public function getIsVerified(): ?bool
  381.     {
  382.         return $this->isVerified;
  383.     }
  384.     public function setIsVerified(?bool $isVerified): self
  385.     {
  386.         $this->isVerified $isVerified;
  387.         return $this;
  388.     }
  389.     /**
  390.      * A visual identifier that represents this user.
  391.      *
  392.      * @see UserInterface
  393.      */
  394.     public function getUserIdentifier(): string
  395.     {
  396.         return (string) $this->mail;
  397.     }
  398.     public function getPassword(): string
  399.     {
  400.         return (string) $this->motDePasse;
  401.     }
  402.     public function getSalt()
  403.     {
  404.         return null;
  405.     }
  406.     public function getUsername()
  407.     {
  408.         return $this->mail;
  409.     }
  410.     public function eraseCredentials()
  411.     {
  412.     }
  413. }