summaryrefslogtreecommitdiff
path: root/src/application/mystic/forum/orm/Topic.php
blob: cfd0c78c65a75e1be8337b902ea6d34aa6de275d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php
declare(strict_types=1);

namespace mystic\forum\orm;

use mystic\forum\attributes\DefaultValue;
use mystic\forum\attributes\PrimaryKey;
use mystic\forum\attributes\References;
use mystic\forum\attributes\Table;

#[Table("public.topics")]
class Topic extends Entity {
    #[PrimaryKey] public string $id;
    public string $title;
    public \DateTimeImmutable $creationDate;
    #[References("public.users", onDelete: References::SET_NULL)] public ?string $createdBy;
    #[DefaultValue("false")] public bool $isLocked;
}