summary refs log tree commit diff
path: root/util/src/entities/Webhook.ts
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-08-31 17:54:09 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-08-31 17:54:09 +0200
commitf31317851811cd172bf5690671c86a1b514f0d0c (patch)
tree29daf11ffeab2bd52648d53e0fff0c18d5cf086f /util/src/entities/Webhook.ts
parentadded first unittests for api endpoints (diff)
downloadserver-f31317851811cd172bf5690671c86a1b514f0d0c.tar.xz
:sparkles: delete _ids from entities
Diffstat (limited to '')
-rw-r--r--util/src/entities/Webhook.ts15
1 files changed, 10 insertions, 5 deletions
diff --git a/util/src/entities/Webhook.ts b/util/src/entities/Webhook.ts

index a75cb959..12ba0d08 100644 --- a/util/src/entities/Webhook.ts +++ b/util/src/entities/Webhook.ts
@@ -27,38 +27,43 @@ export class Webhook extends BaseClass { @Column({ nullable: true }) token?: string; + @Column({ nullable: true }) @RelationId((webhook: Webhook) => webhook.guild) guild_id: string; @JoinColumn({ name: "guild_id" }) - @ManyToOne(() => Guild, (guild: Guild) => guild.id) + @ManyToOne(() => Guild) guild: Guild; + @Column({ nullable: true }) @RelationId((webhook: Webhook) => webhook.channel) channel_id: string; @JoinColumn({ name: "channel_id" }) - @ManyToOne(() => Channel, (channel: Channel) => channel.id) + @ManyToOne(() => Channel) channel: Channel; + @Column({ nullable: true }) @RelationId((webhook: Webhook) => webhook.application) application_id: string; @JoinColumn({ name: "application_id" }) - @ManyToOne(() => Application, (application: Application) => application.id) + @ManyToOne(() => Application) application: Application; + @Column({ nullable: true }) @RelationId((webhook: Webhook) => webhook.user) user_id: string; @JoinColumn({ name: "user_id" }) - @ManyToOne(() => User, (user: User) => user.id) + @ManyToOne(() => User) user: User; + @Column({ nullable: true }) @RelationId((webhook: Webhook) => webhook.guild) source_guild_id: string; @JoinColumn({ name: "source_guild_id" }) - @ManyToOne(() => Guild, (guild: Guild) => guild.id) + @ManyToOne(() => Guild) source_guild: Guild; }