From af08f0d5c7608b3b69eef316ea0ed71423769fdc Mon Sep 17 00:00:00 2001 From: liangtongchuan Date: Fri, 27 Jan 2023 22:56:34 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix(db):=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=96=B0=E6=B7=BB=E5=8A=A0=E6=95=B0=E6=8D=AE=E5=BA=93=E8=A1=A8?= =?UTF-8?q?=E7=9A=84=E7=B4=A2=E5=BC=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shared/db/GVGCity.ts | 2 +- shared/db/GVGTeam.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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