✨ feat(gvgBattle): 补充进入城池返回值中的部分结构
This commit is contained in:
@@ -3,6 +3,7 @@ import { index, getModelForClass, prop, DocumentType, } from '@typegoose/typegoo
|
||||
import { GVG_REC_TYPE } from '../consts';
|
||||
|
||||
@index({ leagueCode: 1, guildCode: 1, configId: 1 })
|
||||
@index({ cityId: 1, configId: 1 })
|
||||
@index({ createTime: -1 })
|
||||
export default class GVGRec extends BaseModel {
|
||||
|
||||
@@ -42,6 +43,13 @@ export default class GVGRec extends BaseModel {
|
||||
const result: GVGRecType[] = await GVGRecModel.find({ leagueCode, type }, { _id: 0, recId: 1, params: 1, createTime: 1 }).sort({ createTime: -1 }).limit(50).lean();
|
||||
return result;
|
||||
}
|
||||
|
||||
// 查询城池战报
|
||||
public static async findByCity(cityId: number, configId: number) {
|
||||
const result: GVGRecType[] = await GVGRecModel.find({ cityId, configId }, { _id: 0, recId: 1, params: 1, createTime: 1 }).sort({ createTime: -1 }).limit(50).lean();
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export const GVGRecModel = getModelForClass(GVGRec);
|
||||
|
||||
Reference in New Issue
Block a user