import { RankParam, LineupParam } from '../rank';
import { DungeonFirstType } from '../../db/DungeonFirst';

class DungeonUserInfo extends RankParam {
    roleId: string;
    constructor(roleId: string, userInfo: RankParam) {
        super(userInfo);
        this.roleId = roleId;
    }
}

export class DungeonResultParam {
    warId: number;
    time: number;
    userInfo: DungeonUserInfo;
    lineup: LineupParam[];

    constructor(dungeon: DungeonFirstType) {
        this.warId = dungeon.warId;
        this.time = dungeon.time;
        this.userInfo = new DungeonUserInfo(dungeon.roleId, dungeon.userInfo);
        this.lineup = dungeon.lineup;
    }
}