diff options
author | Jonas Kohl | 2024-09-12 19:49:17 +0200 |
---|---|---|
committer | Jonas Kohl | 2024-09-12 19:49:17 +0200 |
commit | 086e2d2668784469ec114f6e6fd2b3dace3d7c3b (patch) | |
tree | b9bacedb713501d88d24085940267a7c94e69b29 /src/application/mystic/forum/orm/Topic.php | |
parent | 34b1b391d4b03659a96f868857c230002b351514 (diff) |
Way more progress on forum
Diffstat (limited to 'src/application/mystic/forum/orm/Topic.php')
-rw-r--r-- | src/application/mystic/forum/orm/Topic.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/application/mystic/forum/orm/Topic.php b/src/application/mystic/forum/orm/Topic.php index 202fc50..421f5ec 100644 --- a/src/application/mystic/forum/orm/Topic.php +++ b/src/application/mystic/forum/orm/Topic.php @@ -4,12 +4,13 @@ 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.topics")] class Topic extends Entity { - #[PrimaryKey] - public string $id; + #[PrimaryKey] public string $id; public string $title; public \DateTimeImmutable $creationDate; + #[References("public.users", onDelete: References::SET_NULL)] public ?string $createdBy; } |