diff options
Diffstat (limited to 'util/src/entities/TeamMember.ts')
-rw-r--r-- | util/src/entities/TeamMember.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/util/src/entities/TeamMember.ts b/util/src/entities/TeamMember.ts index 2b1c76f1..f0b54c6f 100644 --- a/util/src/entities/TeamMember.ts +++ b/util/src/entities/TeamMember.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 { User } from "./User"; @@ -15,14 +15,14 @@ export class TeamMember extends BaseClass { @Column("simple-array") permissions: string[]; - @Column() + @RelationId((member: TeamMember) => member.team) team_id: string; @JoinColumn({ name: "team_id" }) @ManyToOne(() => require("./Team").Team, (team: import("./Team").Team) => team.id) team: import("./Team").Team; - @Column() + @RelationId((member: TeamMember) => member.user) user_id: string; @JoinColumn({ name: "user_id" }) |