summary refs log tree commit diff
path: root/util/src/entities/AuditLog.ts
diff options
context:
space:
mode:
Diffstat (limited to 'util/src/entities/AuditLog.ts')
-rw-r--r--util/src/entities/AuditLog.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/util/src/entities/AuditLog.ts b/util/src/entities/AuditLog.ts
index 53e99261..2195771b 100644
--- a/util/src/entities/AuditLog.ts
+++ b/util/src/entities/AuditLog.ts
@@ -1,4 +1,4 @@
-import { Column, Entity, JoinColumn, ManyToOne } from "typeorm";
+import { Column, Entity, JoinColumn, ManyToOne, RelationId } from "typeorm";
 import { BaseClass } from "./BaseClass";
 import { ChannelPermissionOverwrite } from "./Channel";
 import { User } from "./User";
@@ -43,14 +43,14 @@ export enum AuditLogEvents {
 
 @Entity("audit_logs")
 export class AuditLogEntry extends BaseClass {
-	@Column()
+	@RelationId((auditlog: AuditLogEntry) => auditlog.target)
 	target_id: string;
 
 	@JoinColumn({ name: "user_id" })
 	@ManyToOne(() => User, (user: User) => user.id)
 	target?: User;
 
-	@Column()
+	@RelationId((auditlog: AuditLogEntry) => auditlog.user)
 	user_id: string;
 
 	@JoinColumn({ name: "user_id" })