summary refs log tree commit diff
path: root/util/src/entities/Team.ts
diff options
context:
space:
mode:
Diffstat (limited to 'util/src/entities/Team.ts')
-rw-r--r--util/src/entities/Team.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/util/src/entities/Team.ts b/util/src/entities/Team.ts
index 5e645650..fa1b0ed2 100644
--- a/util/src/entities/Team.ts
+++ b/util/src/entities/Team.ts
@@ -1,4 +1,4 @@
-import { Column, Entity, JoinColumn, ManyToMany, ManyToOne } from "typeorm";
+import { Column, Entity, JoinColumn, ManyToMany, ManyToOne, RelationId } from "typeorm";
 import { BaseClass } from "./BaseClass";
 import { TeamMember } from "./TeamMember";
 import { User } from "./User";
@@ -8,7 +8,7 @@ export class Team extends BaseClass {
 	@Column()
 	icon?: string;
 
-	@Column("simple-array")
+	@RelationId((team: Team) => team.members)
 	member_ids: string[];
 
 	@JoinColumn({ name: "member_ids" })
@@ -18,7 +18,7 @@ export class Team extends BaseClass {
 	@Column()
 	name: string;
 
-	@Column()
+	@RelationId((team: Team) => team.owner_user)
 	owner_user_id: string;
 
 	@JoinColumn({ name: "owner_user_id" })