🎈 perf(数据库): 优化数据库索引
This commit is contained in:
@@ -5,8 +5,6 @@ import { LineupParam } from '../domain/rank';
|
||||
/**
|
||||
* 战斗记录接口
|
||||
*/
|
||||
@index({ roleId: 1, battleId: 1 })
|
||||
@index({ battleCode: 1 })
|
||||
|
||||
class Record {
|
||||
@prop({ required: true, type: Number })
|
||||
@@ -39,6 +37,8 @@ class Record {
|
||||
encourageCnt?: number;
|
||||
}
|
||||
|
||||
@index({ roleId: 1, battleId: 1 })
|
||||
@index({ battleCode: 1 })
|
||||
export default class BattleRecord extends BaseModel {
|
||||
@prop({ required: true })
|
||||
roleId: string; // 角色 id
|
||||
|
||||
Reference in New Issue
Block a user