summaryrefslogtreecommitdiff
path: root/src/application/mystic/forum/orm/Attachment.php
blob: 64e357ca0f8f86d26decf9767699424629e2f6e2 (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\Column;
use mystic\forum\attributes\PrimaryKey;
use mystic\forum\attributes\References;
use mystic\forum\attributes\Table;

#[Table("public.attachments")]
class Attachment extends Entity {
    #[PrimaryKey] public string $id;
    #[References("public.posts", onDelete: References::CASCADE)] public string $postId;
    public string $name;
    public string $mimeType;
    #[Column(columnType: "bytea")] public string $contents;
}