diff options
Diffstat (limited to 'util/src/entities/Ban.ts')
-rw-r--r-- | util/src/entities/Ban.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/util/src/entities/Ban.ts b/util/src/entities/Ban.ts index ceea4a05..2553e886 100644 --- a/util/src/entities/Ban.ts +++ b/util/src/entities/Ban.ts @@ -1,25 +1,25 @@ -import { Column, Entity, JoinColumn, ManyToOne } from "typeorm"; +import { Column, Entity, JoinColumn, ManyToOne, RelationId } from "typeorm"; import { BaseClass } from "./BaseClass"; import { Guild } from "./Guild"; import { User } from "./User"; @Entity("bans") export class Ban extends BaseClass { - @Column() + @RelationId((ban: Ban) => ban.user) user_id: string; @JoinColumn({ name: "user_id" }) @ManyToOne(() => User, (user: User) => user.id) user: User; - @Column() + @RelationId((ban: Ban) => ban.guild) guild_id: string; @JoinColumn({ name: "guild_id" }) @ManyToOne(() => Guild, (guild: Guild) => guild.id) guild: Guild; - @Column() + @RelationId((ban: Ban) => ban.executor) executor_id: string; @JoinColumn({ name: "executor_id" }) |