Consistent relations, url property, src channel

This commit is contained in:
TomatoCake
2024-07-18 15:35:10 +02:00
parent 873107f90d
commit adc3474216
7 changed files with 1362 additions and 308 deletions
+13 -3
View File
@@ -85,13 +85,23 @@ export class Webhook extends BaseClass {
@Column({ nullable: true })
@RelationId((webhook: Webhook) => webhook.guild)
source_guild_id: string;
source_guild_id?: string;
@JoinColumn({ name: "source_guild_id" })
@ManyToOne(() => Guild, {
onDelete: "CASCADE",
})
source_guild: Guild;
source_guild?: Guild;
url?: string;
@Column({ nullable: true })
@RelationId((webhook: Webhook) => webhook.channel)
source_channel_id: string;
@JoinColumn({ name: "source_channel_id" })
@ManyToOne(() => Channel, {
onDelete: "CASCADE",
})
source_channel: Channel;
url: string;
}