diff options
author | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-08-31 17:54:09 +0200 |
---|---|---|
committer | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-08-31 17:54:09 +0200 |
commit | f31317851811cd172bf5690671c86a1b514f0d0c (patch) | |
tree | 29daf11ffeab2bd52648d53e0fff0c18d5cf086f /util/src/entities/Ban.ts | |
parent | added first unittests for api endpoints (diff) | |
download | server-f31317851811cd172bf5690671c86a1b514f0d0c.tar.xz |
:sparkles: delete _ids from entities
Diffstat (limited to 'util/src/entities/Ban.ts')
-rw-r--r-- | util/src/entities/Ban.ts | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/util/src/entities/Ban.ts b/util/src/entities/Ban.ts index f1cbd849..e8a6d648 100644 --- a/util/src/entities/Ban.ts +++ b/util/src/entities/Ban.ts @@ -5,25 +5,28 @@ import { User } from "./User"; @Entity("bans") export class Ban extends BaseClass { + @Column({ nullable: true }) @RelationId((ban: Ban) => ban.user) user_id: string; @JoinColumn({ name: "user_id" }) - @ManyToOne(() => User, (user: User) => user.id) + @ManyToOne(() => User) user: User; + @Column({ nullable: true }) @RelationId((ban: Ban) => ban.guild) guild_id: string; @JoinColumn({ name: "guild_id" }) - @ManyToOne(() => Guild, (guild: Guild) => guild.id) + @ManyToOne(() => Guild) guild: Guild; + @Column({ nullable: true }) @RelationId((ban: Ban) => ban.executor) executor_id: string; @JoinColumn({ name: "executor_id" }) - @ManyToOne(() => User, (user: User) => user.id) + @ManyToOne(() => User) executor: User; @Column() |