diff options
Diffstat (limited to 'src/model/entities/User.php')
| -rw-r--r-- | src/model/entities/User.php | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/model/entities/User.php b/src/model/entities/User.php index 26802e2..36bc4db 100644 --- a/src/model/entities/User.php +++ b/src/model/entities/User.php | |||
| @@ -22,15 +22,24 @@ class User | |||
| 22 | #[ORM\Column(type: "string", length: 255, unique: true)] // risque de modifier son mot de passe sans s'apercevoir qu'il fonctionne encore sur un autre compte | 22 | #[ORM\Column(type: "string", length: 255, unique: true)] // risque de modifier son mot de passe sans s'apercevoir qu'il fonctionne encore sur un autre compte |
| 23 | private string $login; | 23 | private string $login; |
| 24 | 24 | ||
| 25 | #[ORM\Column(type: "string", length: 50)] | ||
| 26 | private string $role; | ||
| 27 | |||
| 25 | #[ORM\Column(type: "string", length: 255)] | 28 | #[ORM\Column(type: "string", length: 255)] |
| 26 | private string $password; | 29 | private string $password; |
| 27 | 30 | ||
| 28 | public function __construct(string $login, string $password) | 31 | public function __construct(string $login, string $role, string $password) |
| 29 | { | 32 | { |
| 30 | $this->login = $login; | 33 | $this->login = $login; |
| 34 | $this->role = $role; | ||
| 31 | $this->password = $password; | 35 | $this->password = $password; |
| 32 | } | 36 | } |
| 33 | 37 | ||
| 38 | public function getId(): int | ||
| 39 | { | ||
| 40 | return $this->id_user; | ||
| 41 | } | ||
| 42 | |||
| 34 | public function getLogin(): string | 43 | public function getLogin(): string |
| 35 | { | 44 | { |
| 36 | return $this->login; | 45 | return $this->login; |
| @@ -39,6 +48,14 @@ class User | |||
| 39 | { | 48 | { |
| 40 | $this->login = $login; | 49 | $this->login = $login; |
| 41 | } | 50 | } |
| 51 | public function getRole(): string | ||
| 52 | { | ||
| 53 | return $this->role; | ||
| 54 | } | ||
| 55 | public function setRole(string $role): void | ||
| 56 | { | ||
| 57 | $this->role = $role; | ||
| 58 | } | ||
| 42 | public function getPassword(): string | 59 | public function getPassword(): string |
| 43 | { | 60 | { |
| 44 | return $this->password; | 61 | return $this->password; |
