aboutsummaryrefslogtreecommitdiffhomepage
path: root/services/app/src/Models/User.php
blob: c80e661ec1f7b800ae9422a89e89bedf3409b97b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php

declare(strict_types=1);

namespace Nsfisis\Albatross\Models;

final class User
{
    public function __construct(
        public readonly int $user_id,
        public readonly string $username,
        public readonly bool $is_admin,
    ) {
    }

    public static function create(
        string $username,
        bool $is_admin,
    ): self {
        return new self(
            user_id: 0,
            username: $username,
            is_admin: $is_admin,
        );
    }
}