Some work on channel-gating

This commit is contained in:
Charlie Laabs
2021-12-20 23:29:01 -06:00
parent 466c122dd2
commit a2ae99d75d
5 changed files with 85 additions and 28 deletions

View File

@@ -5,10 +5,10 @@ import { Guild } from './Guild';
@Entity()
export class Channel extends BaseEntity {
@PrimaryColumn()
id: string;
id: number;
@Column({
default: true,
default: false,
})
listen: boolean;

View File

@@ -5,7 +5,7 @@ import { Channel } from './Channel';
@Entity()
export class Guild extends BaseEntity {
@PrimaryColumn()
id: string;
id: number;
@OneToMany(() => Channel, (channel) => channel.guild, { onDelete: 'CASCADE', cascade: true })
channels: Channel[];