src/Entity/Utilisateur.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\DBAL\Types\Types;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Security\Core\User\UserInterface;
  6. use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
  7. /**
  8. * Utilisateur
  9. *
  10. * @ORM\Table(name="UTILISATEUR")
  11. * @ORM\Entity
  12. */
  13. class Utilisateur implements UserInterface, PasswordAuthenticatedUserInterface
  14. {
  15. /**
  16. * @var int
  17. *
  18. * @ORM\Column(name="idutilisateur", type="integer", nullable=false)
  19. * @ORM\Id
  20. * @ORM\GeneratedValue(strategy="IDENTITY")
  21. */
  22. private $idutilisateur;
  23. /**
  24. * @var bool
  25. *
  26. * @ORM\Column(name="actifutilisateur", type="boolean", nullable=false, options={"default"="1"})
  27. */
  28. private $actifutilisateur = true;
  29. /**
  30. * @var \DateTime
  31. *
  32. * @ORM\Column(name="datecrea", type="datetime", nullable=false)
  33. */
  34. private $datecrea;
  35. /**
  36. * @var \DateTime
  37. *
  38. * @ORM\Column(name="datemaj", type="datetime", nullable=false)
  39. */
  40. private $datemaj;
  41. /**
  42. * @var string
  43. *
  44. * @ORM\Column(name="login", type="string", length=255, nullable=false)
  45. */
  46. private $login;
  47. /**
  48. * @var string|null
  49. *
  50. * @ORM\Column(name="password", type="string", length=255, nullable=true)
  51. */
  52. private $password;
  53. /**
  54. * @var int|null
  55. *
  56. * @ORM\Column(name="pers_id", type="integer", nullable=true)
  57. */
  58. private $persId;
  59. public function getIdutilisateur(): ?int
  60. {
  61. return $this->idutilisateur;
  62. }
  63. public function isActifutilisateur(): ?bool
  64. {
  65. return $this->actifutilisateur;
  66. }
  67. public function setActifutilisateur(bool $actifutilisateur): static
  68. {
  69. $this->actifutilisateur = $actifutilisateur;
  70. return $this;
  71. }
  72. public function getDatecrea(): ?\DateTimeInterface
  73. {
  74. return $this->datecrea;
  75. }
  76. public function setDatecrea(\DateTimeInterface $datecrea): static
  77. {
  78. $this->datecrea = $datecrea;
  79. return $this;
  80. }
  81. public function getDatemaj(): ?\DateTimeInterface
  82. {
  83. return $this->datemaj;
  84. }
  85. public function setDatemaj(\DateTimeInterface $datemaj): static
  86. {
  87. $this->datemaj = $datemaj;
  88. return $this;
  89. }
  90. public function getLogin(): ?string
  91. {
  92. return $this->login;
  93. }
  94. public function setLogin(string $login): static
  95. {
  96. $this->login = $login;
  97. return $this;
  98. }
  99. public function getPassword(): ?string
  100. {
  101. return $this->password;
  102. }
  103. public function setPassword(?string $password): static
  104. {
  105. $this->password = $password;
  106. return $this;
  107. }
  108. public function getPersId(): ?int
  109. {
  110. return $this->persId;
  111. }
  112. public function setPersId(?int $persId): static
  113. {
  114. $this->persId = $persId;
  115. return $this;
  116. }
  117. public function getRoles(): array
  118. {
  119. return $this->roles ?? ['ROLE_CAS_AUTHENTICATED'];
  120. }
  121. public function getUsername(): string
  122. {
  123. return $this->login;
  124. }
  125. public function getUserIdentifier(): string
  126. {
  127. return $this->login;
  128. }
  129. public function getSalt(): ?string
  130. {
  131. return null;
  132. }
  133. public function eraseCredentials(): void
  134. {
  135. }
  136. }