diff --git a/shared/db/GVGCity.ts b/shared/db/GVGCity.ts index 6ee90dc0e..8993d2587 100644 --- a/shared/db/GVGCity.ts +++ b/shared/db/GVGCity.ts @@ -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 }) diff --git a/shared/db/GVGTeam.ts b/shared/db/GVGTeam.ts index b533a7a9b..4fc3aa168 100644 --- a/shared/db/GVGTeam.ts +++ b/shared/db/GVGTeam.ts @@ -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