From 086e2d2668784469ec114f6e6fd2b3dace3d7c3b Mon Sep 17 00:00:00 2001 From: Jonas Kohl Date: Thu, 12 Sep 2024 19:49:17 +0200 Subject: Way more progress on forum --- src/application/mystic/forum/orm/Topic.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/application/mystic/forum/orm/Topic.php') 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; } -- cgit v1.2.3