✨ feat(gvg): 添加队伍快照

This commit is contained in:
luying
2023-02-17 10:59:38 +08:00
parent a838aba8e5
commit 3141566eb3
6 changed files with 50 additions and 10 deletions
+3 -3
View File
@@ -2,8 +2,8 @@
import BaseModel from "./BaseModel";
import { index, getModelForClass, prop, DocumentType } from '@typegoose/typegoose';
import { genCode } from "../pubUtils/util";
import { LineupHero } from './../domain/roleField/hero';
import { GVGTeamType } from "./GVGTeam";
import { GVGHeroInfo } from "../domain/dbGeneral";
class TeamInfo {
@prop({ required: true })
@@ -42,8 +42,8 @@ class TeamInfo {
@prop({ required: true, default: 0 })
durability: number; // 耐久
@prop({ required: true, type: () => LineupHero, _id: false })
lineup: LineupHero[]
@prop({ required: true, type: () => GVGHeroInfo, _id: false })
lineup: GVGHeroInfo[]
}
@index({ battleCode: 1 })
+3 -3
View File
@@ -2,11 +2,11 @@
import BaseModel from "./BaseModel";
import { index, getModelForClass, prop, DocumentType } from '@typegoose/typegoose';
import { genCode } from "../pubUtils/util";
import { LineupHero } from './../domain/roleField/hero';
import { nowSeconds } from "../pubUtils/timeUtil";
import { GVG } from "../pubUtils/dicParam";
import { DicGVGAreaPoint } from "../pubUtils/dictionary/DicGVGAreaPoint";
import { InitTeamParam, SaveTeamUpdateParam } from "../domain/gvgField/gvgDb";
import { GVGHeroInfo } from "../domain/dbGeneral";
@index({ roleId: 1, index: 1 })
@index({ teamCode: 1 })
@@ -94,8 +94,8 @@ export default class GVGTeam extends BaseModel {
@prop({ required: true, default: 0 })
leagueScore: number; // 积分
@prop({ required: true, type: () => LineupHero, _id: false })
lineup: LineupHero[];
@prop({ required: true, type: () => GVGHeroInfo, _id: false })
lineup: GVGHeroInfo[];
@prop({ required: true })
lineupCe: number;