summaryrefslogtreecommitdiff
path: root/src/user.php
blob: e9fec0b4b62a2e8c82e361a5c18d73aa25950da9 (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
27
28
29
30
31
32
33
34
35
36
<?php
class User
{
    private string $id;
    private string $username;
    private int $joined_at;
    private int $last_active_at;

    function __construct($row)
    {
        $this->id = $row["id"];
        $this->username = $row["username"];
        $this->joined_at = strtotime($row["joined_at"]);
        $this->last_active_at = strtotime($row["last_active_at"]);
    }

    function id()
    {
        return $this->id;
    }

    function username()
    {
        return $this->username;
    }

    function joined_at()
    {
        return $this->joined_at;
    }

    function last_active_at()
    {
        return $this->last_active_at;
    }
}