summaryrefslogtreecommitdiff
path: root/src/application/mystic/forum/orm/Topic.php
diff options
context:
space:
mode:
authorJonas Kohl2024-09-12 19:49:17 +0200
committerJonas Kohl2024-09-12 19:49:17 +0200
commit086e2d2668784469ec114f6e6fd2b3dace3d7c3b (patch)
treeb9bacedb713501d88d24085940267a7c94e69b29 /src/application/mystic/forum/orm/Topic.php
parent34b1b391d4b03659a96f868857c230002b351514 (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.php5
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;
}