Large swathes of re-engineering
This commit is contained in:
27
src/utilties/storage/entities/DBChannel.ts
Normal file
27
src/utilties/storage/entities/DBChannel.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { Column, Entity, ManyToOne, OneToMany, PrimaryColumn } from "typeorm";
|
||||
import { DBServer } from "./DBServer";
|
||||
import { DBMessage } from "./DBMessage";
|
||||
|
||||
@Entity()
|
||||
export class DBChannel {
|
||||
@PrimaryColumn({type: "bigint"})
|
||||
channel_snowflake: string
|
||||
|
||||
@ManyToOne(() => DBServer, (server: DBServer) => server.channels, {nullable: true})
|
||||
server: DBServer | null
|
||||
|
||||
@Column()
|
||||
channel_name: string
|
||||
|
||||
@Column()
|
||||
is_thread: boolean
|
||||
|
||||
@Column()
|
||||
is_dm: boolean
|
||||
|
||||
@Column()
|
||||
is_voice: boolean
|
||||
|
||||
@OneToMany(() => DBMessage, (message: DBMessage) => message.channel)
|
||||
messages: DBMessage[]
|
||||
}
|
||||
Reference in New Issue
Block a user