🐞 fix(db): 修改新添加数据库表的索引
This commit is contained in:
@@ -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 })
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user