mirror of
https://github.com/pacnpal/markov-discord.git
synced 2025-12-22 20:01:06 -05:00
Initial rough working draft of v3
This commit is contained in:
12
src/entity/Guild.ts
Normal file
12
src/entity/Guild.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
/* eslint-disable import/no-cycle */
|
||||
import { BaseEntity, Entity, OneToMany, PrimaryColumn } from 'typeorm';
|
||||
import { Channel } from './Channel';
|
||||
|
||||
@Entity()
|
||||
export class Guild extends BaseEntity {
|
||||
@PrimaryColumn()
|
||||
id: string;
|
||||
|
||||
@OneToMany(() => Channel, (channel) => channel.guild, { onDelete: 'CASCADE', cascade: true })
|
||||
channels: Channel[];
|
||||
}
|
||||
Reference in New Issue
Block a user