summary refs log tree commit diff
path: root/util/src/entities/Message.ts
diff options
context:
space:
mode:
Diffstat (limited to 'util/src/entities/Message.ts')
-rw-r--r--util/src/entities/Message.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/util/src/entities/Message.ts b/util/src/entities/Message.ts
index 20a44ca3..e577d5df 100644
--- a/util/src/entities/Message.ts
+++ b/util/src/entities/Message.ts
@@ -84,8 +84,10 @@ export class Message extends BaseClass {
 	@RelationId((message: Message) => message.member)
 	member_id: string;
 
-	@JoinColumn({ name: "member_id" })
-	@ManyToOne(() => Member)
+	@JoinColumn({ name: "author_id", referencedColumnName: "id" })
+	@ManyToOne(() => User, {
+		onDelete: "CASCADE",
+	})
 	member?: Member;
 
 	@Column({ nullable: true })