summary refs log tree commit diff
path: root/util/src/entities/Recipient.ts
diff options
context:
space:
mode:
Diffstat (limited to 'util/src/entities/Recipient.ts')
-rw-r--r--util/src/entities/Recipient.ts11
1 files changed, 9 insertions, 2 deletions
diff --git a/util/src/entities/Recipient.ts b/util/src/entities/Recipient.ts
index 2a27b29f..a945f938 100644
--- a/util/src/entities/Recipient.ts
+++ b/util/src/entities/Recipient.ts
@@ -8,7 +8,9 @@ export class Recipient extends BaseClass {
 	channel_id: string;
 
 	@JoinColumn({ name: "channel_id" })
-	@ManyToOne(() => require("./Channel").Channel)
+	@ManyToOne(() => require("./Channel").Channel, {
+		onDelete: "CASCADE",
+	})
 	channel: import("./Channel").Channel;
 
 	@Column()
@@ -16,8 +18,13 @@ export class Recipient extends BaseClass {
 	user_id: string;
 
 	@JoinColumn({ name: "user_id" })
-	@ManyToOne(() => require("./User").User)
+	@ManyToOne(() => require("./User").User, {
+		onDelete: "CASCADE",
+	})
 	user: import("./User").User;
 
+	@Column({ default: false })
+	closed: boolean;
+
 	// TODO: settings/mute/nick/added at/encryption keys/read_state
 }