package cn.reghao.tnb.content.app.exam.model.vo;

import cn.reghao.tnb.content.app.exam.model.dto.UserResult;
import cn.reghao.tnb.content.app.exam.model.po.Paper;
import lombok.Setter;

import java.util.List;
import java.util.Map;

/**
 * @author reghao
 * @date 2024-08-29 17:48:51
 */
@Setter
public class PaperDetail {
    private int paperId;
    private String name;
    private int status;
    private int duration;
    private int totalScore;
    // questionType -> list
    private Map<Integer, List<QuestionInfo>> questionMap;
    private UserResult userResult;

    public PaperDetail(Paper paper, int status, Map<Integer, List<QuestionInfo>> questionMap, UserResult userResult) {
        this.paperId = paper.getId();
        this.name = paper.getName();
        this.status = status;
        this.duration = paper.getDuration();
        this.totalScore = paper.getTotalScore();
        this.questionMap = questionMap;
        this.userResult = userResult;
    }

    public PaperDetail(int paperId, int status) {
        this.paperId = paperId;
        this.status = status;
    }
}
