mirror of
https://github.com/pacnpal/markov-discord.git
synced 2025-12-20 03:01:04 -05:00
13 lines
368 B
TypeScript
13 lines
368 B
TypeScript
/* eslint-disable import/no-cycle */
|
|
import { BaseEntity, Entity, OneToMany, PrimaryColumn } from 'typeorm';
|
|
import { Channel } from './Channel';
|
|
|
|
@Entity()
|
|
export class Guild extends BaseEntity {
|
|
@PrimaryColumn({ type: 'text' })
|
|
id: string;
|
|
|
|
@OneToMany(() => Channel, (channel) => channel.guild, { onDelete: 'CASCADE', cascade: true })
|
|
channels: Channel[];
|
|
}
|