Complete channel add/remove/list functionality

This commit is contained in:
Charlie Laabs
2021-12-23 21:54:42 -06:00
parent 3b946b72ec
commit 0052ffff3b
5 changed files with 105 additions and 61 deletions

View File

@@ -4,8 +4,8 @@ import { Guild } from './Guild';
@Entity()
export class Channel extends BaseEntity {
@PrimaryColumn()
id: number;
@PrimaryColumn({ type: 'text' })
id: string;
@Column({
default: false,

View File

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