🐞 fix(db): 修改新添加数据库表的索引

This commit is contained in:
liangtongchuan
2023-01-27 22:56:34 +08:00
committed by luying
parent 51ac6d8c3e
commit af08f0d5c7
2 changed files with 2 additions and 2 deletions

View File

@@ -1,7 +1,7 @@
import BaseModel from "./BaseModel";
import { index, getModelForClass, prop, DocumentType } from '@typegoose/typegoose';
@index({ configId: -1 })
@index({ configId: 1, cityId: 1 })
// GVGCity 类,继承自 BaseModel
export default class GVGCity extends BaseModel {
@prop({ required: true, default: 1 })

View File

@@ -2,7 +2,7 @@
import BaseModel from "./BaseModel";
import { index, getModelForClass, prop, DocumentType } from '@typegoose/typegoose';
@index({ teamId: 1 })
@index({ roleId: 1, teamId: 1 })
export default class GVGTeam extends BaseModel {
@prop({ required: true })
roleId: string; // 玩家id