summary refs log tree commit diff
path: root/src/util/entities/ReadState.ts
diff options
context:
space:
mode:
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 })