feat(guild-model): add practical indexes for channel/dm/member queries
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
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;
|
||||
|
||||
@@ -22,5 +24,6 @@ export class Channel {
|
||||
lastSeq!: number;
|
||||
|
||||
@CreateDateColumn()
|
||||
@Index()
|
||||
createdAt!: Date;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user