feat: bootstrap from Fabric monorepo
This commit is contained in:
29
src/entities/channel.entity.ts
Normal file
29
src/entities/channel.entity.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import { Column, CreateDateColumn, Entity, Index, PrimaryGeneratedColumn } from 'typeorm';
|
||||
|
||||
@Entity('channels')
|
||||
@Index(['guildId', 'createdAt'])
|
||||
export class Channel {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id!: string;
|
||||
|
||||
@Index()
|
||||
@Column({ type: 'char', length: 36 })
|
||||
guildId!: string;
|
||||
|
||||
@Column({ type: 'varchar', length: 120 })
|
||||
name!: string;
|
||||
|
||||
@Column({ type: 'varchar', length: 16, default: 'text' })
|
||||
kind!: 'text' | 'announcement';
|
||||
|
||||
@Column({ type: 'boolean', default: false })
|
||||
isPrivate!: boolean;
|
||||
|
||||
@Index()
|
||||
@Column({ default: 0 })
|
||||
lastSeq!: number;
|
||||
|
||||
@CreateDateColumn()
|
||||
@Index()
|
||||
createdAt!: Date;
|
||||
}
|
||||
Reference in New Issue
Block a user