diff --git a/src/Entity/User.php b/src/Entity/User.php index cc21b3e..e004bea 100644 --- a/src/Entity/User.php +++ b/src/Entity/User.php @@ -1,18 +1,99 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ namespace App\Entity; +use App\Enums\UserAuth; + class User { public function __construct( - private string $nick, - private string $password, - private string $first = '', - private string $last = '', - private int $id = 0, - private bool $isAdmin = false + private string $nick = '', + private string $password = '', + private string $first = '', + private string $last = '', + private int $id = 0, + private bool $isAdmin = false, + private UserAuth $userAuth = UserAuth::AUTH_ANONYMOUS ) { // empty body } + + public function getNick(): string + { + return $this->nick; + } + + public function setNick(string $nick): void + { + $this->nick = $nick; + } + + public function getPassword(): string + { + return $this->password; + } + + public function setPassword(string $password): void + { + $this->password = $password; + } + + public function getFirst(): string + { + return $this->first; + } + + public function setFirst(string $first): void + { + $this->first = $first; + } + + public function getLast(): string + { + return $this->last; + } + + public function setLast(string $last): void + { + $this->last = $last; + } + + public function getId(): int + { + return $this->id; + } + + public function setId(int $id): void + { + $this->id = $id; + } + + public function isAdmin(): bool + { + return $this->isAdmin; + } + + public function setIsAdmin(bool $isAdmin): void + { + $this->isAdmin = $isAdmin; + } + + public function getAuth() + { + return UserAuth::AUTH_ANONYMOUS; + } + + public function setAuth(UserAuth $userAuth) + { + $this->userAuth = $userAuth; + } + } \ No newline at end of file