summary refs log tree commit diff
path: root/util/src/entities/Template.ts
diff options
context:
space:
mode:
Diffstat (limited to 'util/src/entities/Template.ts')
-rw-r--r--util/src/entities/Template.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/util/src/entities/Template.ts b/util/src/entities/Template.ts
index 2d8c9b6c..76f77ba6 100644
--- a/util/src/entities/Template.ts
+++ b/util/src/entities/Template.ts
@@ -17,11 +17,12 @@ export class Template extends BaseClass {
 	@Column({ nullable: true })
 	usage_count?: number;
 
+	@Column({ nullable: true })
 	@RelationId((template: Template) => template.creator)
 	creator_id: string;
 
 	@JoinColumn({ name: "creator_id" })
-	@ManyToOne(() => User, (user: User) => user.id)
+	@ManyToOne(() => User)
 	creator: User;
 
 	@Column()
@@ -30,11 +31,12 @@ export class Template extends BaseClass {
 	@Column()
 	updated_at: Date;
 
+	@Column({ nullable: true })
 	@RelationId((template: Template) => template.source_guild)
 	source_guild_id: string;
 
 	@JoinColumn({ name: "source_guild_id" })
-	@ManyToOne(() => Guild, (guild: Guild) => guild.id)
+	@ManyToOne(() => Guild)
 	source_guild: Guild;
 
 	@Column({ type: "simple-json" })