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

import cn.reghao.jutil.jdk.converter.DateTimeConverter;
import cn.reghao.tnb.content.app.exam.model.po.Paper;

/**
 * @author reghao
 * @date 2024-08-28 09:02:59
 */
public class PaperView {
    private Integer examId;
    private String examName;
    private String examDesc;
    private Integer type;
    private String password;
    private Integer duration;
    private String startTime;
    private String endTime;
    private Integer totalScore;
    private Integer passScore;
    private Integer status;

    public PaperView(Paper paper) {
        this.type = 1;
        this.examId = paper.getId();
        this.examName = paper.getName();
        this.examDesc = paper.getDescription();
        this.password = paper.getPasscode();
        this.duration = paper.getDuration();
        this.startTime = DateTimeConverter.format(paper.getStartTime());
        this.endTime = DateTimeConverter.format(paper.getEndTime());
        this.totalScore = paper.getTotalScore();
        this.passScore = paper.getPassScore();
        this.status = 1;
    }
}
