summary refs log tree commit diff
path: root/src/util/entities/AuditLog.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/entities/AuditLog.ts')
-rw-r--r--src/util/entities/AuditLog.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/util/entities/AuditLog.ts b/src/util/entities/AuditLog.ts
index 6f394f42..f8c65145 100644
--- a/src/util/entities/AuditLog.ts
+++ b/src/util/entities/AuditLog.ts
@@ -1,4 +1,5 @@
-import { Column, Entity, JoinColumn, ManyToOne, RelationId } from "typeorm";
+import "reflect-metadata";
+import { Column, Entity, JoinColumn, ManyToOne, Relation, RelationId } from "typeorm";
 import { BaseClass } from "./BaseClass";
 import { ChannelPermissionOverwrite } from "./Channel";
 import { User } from "./User";
@@ -97,7 +98,7 @@ export enum AuditLogEvents {
 export class AuditLog extends BaseClass {
 	@JoinColumn({ name: "target_id" })
 	@ManyToOne(() => User)
-	target?: User;
+	target?: Relation<User>;
 
 	@Column({ nullable: true })
 	@RelationId((auditlog: AuditLog) => auditlog.user)
@@ -105,7 +106,7 @@ export class AuditLog extends BaseClass {
 
 	@JoinColumn({ name: "user_id" })
 	@ManyToOne(() => User, (user: User) => user.id)
-	user: User;
+	user: Relation<User>;
 
 	@Column({ type: "int" })
 	action_type: AuditLogEvents;