summary refs log tree commit diff
path: root/src/util/entities/Channel.ts
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2022-08-27 07:07:05 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2022-08-30 17:10:46 +0200
commitfeca7a5d620362d028c8f31353b0c996693697e3 (patch)
treeefda8bf7552085e247bc0082d151bcb8d7f31cee /src/util/entities/Channel.ts
parentprettier (diff)
downloadserver-feca7a5d620362d028c8f31353b0c996693697e3.tar.xz
Merge 'webrtc' into 'dev/staging_webrtc'
Diffstat (limited to 'src/util/entities/Channel.ts')
-rw-r--r--src/util/entities/Channel.ts21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/util/entities/Channel.ts b/src/util/entities/Channel.ts

index b17fdba0..17a077ba 100644 --- a/src/util/entities/Channel.ts +++ b/src/util/entities/Channel.ts
@@ -56,7 +56,7 @@ export class Channel extends BaseClass { cascade: true, orphanedRowAction: "delete" }) - recipients?: Recipient[]; + recipients?: Relation<Recipient[]>; @Column({ nullable: true }) last_message_id: string; @@ -69,7 +69,7 @@ export class Channel extends BaseClass { @ManyToOne(() => Guild, { onDelete: "CASCADE" }) - guild: Guild; + guild: Relation<Guild>; @Column({ nullable: true }) @RelationId((channel: Channel) => channel.parent) @@ -77,7 +77,7 @@ export class Channel extends BaseClass { @JoinColumn({ name: "parent_id" }) @ManyToOne(() => Channel) - parent?: Channel; + parent?: Relation<Channel>; // for group DMs and owned custom channel types @Column({ nullable: true }) @@ -86,7 +86,7 @@ export class Channel extends BaseClass { @JoinColumn({ name: "owner_id" }) @ManyToOne(() => User) - owner: User; + owner: Relation<User>; @Column({ nullable: true }) last_pin_timestamp?: number; @@ -113,16 +113,13 @@ export class Channel extends BaseClass { nsfw?: boolean; @Column({ nullable: true }) - rate_limit_per_user?: number; - - @Column({ nullable: true }) topic?: string; @OneToMany(() => Invite, (invite: Invite) => invite.channel, { cascade: true, orphanedRowAction: "delete" }) - invites?: Invite[]; + invites?: Relation<Invite[]>; @Column({ nullable: true }) retention_policy_id?: string; @@ -131,25 +128,25 @@ export class Channel extends BaseClass { cascade: true, orphanedRowAction: "delete" }) - messages?: Message[]; + messages?: Relation<Message[]>; @OneToMany(() => VoiceState, (voice_state: VoiceState) => voice_state.channel, { cascade: true, orphanedRowAction: "delete" }) - voice_states?: VoiceState[]; + voice_states?: Relation<VoiceState[]>; @OneToMany(() => ReadState, (read_state: ReadState) => read_state.channel, { cascade: true, orphanedRowAction: "delete" }) - read_states?: ReadState[]; + read_states?: Relation<ReadState[]>; @OneToMany(() => Webhook, (webhook: Webhook) => webhook.channel, { cascade: true, orphanedRowAction: "delete" }) - webhooks?: Webhook[]; + webhooks?: Relation<Webhook[]>; @Column({ nullable: true }) flags?: number = 0;