summary refs log tree commit diff
path: root/util/src/entities/Application.ts
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-08-26 20:48:09 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-08-26 20:48:09 +0200
commitdb3f5c0d1b5556e16c37704467b3599a6230be02 (patch)
treee74df1466e66900a284c65e270d56040d0dfde7e /util/src/entities/Application.ts
parent:bug: fix unit tests (diff)
downloadserver-db3f5c0d1b5556e16c37704467b3599a6230be02.tar.xz
:sparkles: use RelationId
Diffstat (limited to 'util/src/entities/Application.ts')
-rw-r--r--util/src/entities/Application.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/util/src/entities/Application.ts b/util/src/entities/Application.ts
index 64b5d2e2..90d0f056 100644
--- a/util/src/entities/Application.ts
+++ b/util/src/entities/Application.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 { Guild } from "./Guild";
 import { Team } from "./Team";
@@ -38,14 +38,14 @@ export class Application extends BaseClass {
 	@Column()
 	verify_key: string;
 
-	@Column()
+	@RelationId((application: Application) => application.team)
 	team_id: string;
 
 	@JoinColumn({ name: "team_id" })
 	@ManyToOne(() => Team, (team: Team) => team.id)
 	team?: Team;
 
-	@Column()
+	@RelationId((application: Application) => application.guild)
 	guild_id: string;
 
 	@JoinColumn({ name: "guild_id" })