summary refs log tree commit diff
path: root/src/util/entities/ReadState.ts
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2022-08-27 07:07:05 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2022-08-30 17:10:46 +0200
commitfeca7a5d620362d028c8f31353b0c996693697e3 (patch)
treeefda8bf7552085e247bc0082d151bcb8d7f31cee /src/util/entities/ReadState.ts
parentprettier (diff)
downloadserver-feca7a5d620362d028c8f31353b0c996693697e3.tar.xz
Merge 'webrtc' into 'dev/staging_webrtc'
Diffstat (limited to 'src/util/entities/ReadState.ts')
-rw-r--r--src/util/entities/ReadState.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/util/entities/ReadState.ts b/src/util/entities/ReadState.ts
index 77d2c08a..462a06f9 100644
--- a/src/util/entities/ReadState.ts
+++ b/src/util/entities/ReadState.ts
@@ -1,4 +1,5 @@
-import { Column, Entity, Index, JoinColumn, ManyToOne, RelationId } from "typeorm";
+import "reflect-metadata";
+import { Column, Entity, Index, JoinColumn, ManyToOne, Relation, RelationId } from "typeorm";
 import { BaseClass } from "./BaseClass";
 import { Channel } from "./Channel";
 import { User } from "./User";
@@ -18,7 +19,7 @@ export class ReadState extends BaseClass {
 	@ManyToOne(() => Channel, {
 		onDelete: "CASCADE"
 	})
-	channel: Channel;
+	channel: Relation<Channel>;
 
 	@Column()
 	@RelationId((read_state: ReadState) => read_state.user)
@@ -28,7 +29,7 @@ export class ReadState extends BaseClass {
 	@ManyToOne(() => User, {
 		onDelete: "CASCADE"
 	})
-	user: User;
+	user: Relation<User>;
 
 	// fully read marker
 	@Column({ nullable: true })