✨ feat(gvg): 添加激战期动态
This commit is contained in:
@@ -10,6 +10,9 @@ class TeamInfo {
|
||||
@prop({ required: true })
|
||||
roleId: string; // 玩家id
|
||||
|
||||
@prop({ required: true })
|
||||
roleName: string; // 玩家id
|
||||
|
||||
@prop({ required: true })
|
||||
teamCode: string; // 玩家队伍唯一标识
|
||||
|
||||
@@ -45,6 +48,18 @@ class TeamInfo {
|
||||
|
||||
@prop({ required: true, type: () => GVGHeroInfo, _id: false })
|
||||
lineup: GVGHeroInfo[]
|
||||
|
||||
@prop({ required: true, default: 0 })
|
||||
isRobot: boolean; // 是否是机器人
|
||||
|
||||
@prop({ required: true, default: 0 })
|
||||
isCatapult: boolean; // 是否是投石车
|
||||
|
||||
@prop({ required: true, default: 0 })
|
||||
originPointId: number;
|
||||
|
||||
@prop({ required: true, default: 0 })
|
||||
curTeamBreak: boolean;
|
||||
}
|
||||
|
||||
@index({ battleCode: 1 })
|
||||
|
||||
+11
-2
@@ -45,11 +45,20 @@ export default class GVGRec extends BaseModel {
|
||||
}
|
||||
|
||||
// 查询城池战报
|
||||
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();
|
||||
public static async findBattleRecByCity(configId: number, groupId: number, serverType: number, cityId: number) {
|
||||
const result: GVGRecType[] = await GVGRecModel.find({ cityId, configId, groupId, serverType, type: GVG_REC_TYPE.BATTLE_BY_CITY }, { _id: 0, recId: 1, params: 1, createTime: 1 }).sort({ createTime: -1 }).limit(50).lean();
|
||||
return result;
|
||||
}
|
||||
|
||||
public static async findBattleRecByLeague(configId: number, leagueCode: string) {
|
||||
const result: GVGRecType[] = await GVGRecModel.find({ configId, leagueCode, type: GVG_REC_TYPE.BATTLE_BY_LEAGUE }, { _id: 0, recId: 1, params: 1, createTime: 1 }).sort({ createTime: -1 }).limit(50).lean();
|
||||
return result;
|
||||
}
|
||||
|
||||
public static async findBattleRecByRole(configId: number, roleId: string, leagueCode: string) {
|
||||
const result: GVGRecType[] = await GVGRecModel.find({ configId, roleId, leagueCode, type: GVG_REC_TYPE.BATTLE_BY_ROLE }, { _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