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

namespace mystic\forum\orm;

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

#[Table("public.posts")]
class Post extends Entity {
    #[PrimaryKey] public string $id;
    public string $content;
    #[References("public.users")] public string $authorId;
    public \DateTimeImmutable $postDate;
    #[References("public.topics", cascadeOnDelete: true)] public string $topicId;
}