add is admin to user entity
This commit is contained in:
parent
affa1e7b1b
commit
0e86af3e81
1 changed files with 6 additions and 0 deletions
|
|
@ -9,6 +9,7 @@ class User
|
|||
public function __construct(
|
||||
private int $id,
|
||||
private EmailAddress $email,
|
||||
private bool $isAdmin = false,
|
||||
) {}
|
||||
|
||||
public function getId(): int
|
||||
|
|
@ -20,4 +21,9 @@ class User
|
|||
{
|
||||
return $this->email;
|
||||
}
|
||||
|
||||
public function isAdmin(): bool
|
||||
{
|
||||
return $this->isAdmin;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue