package com.ssj.service.kmt.exercisesys.dto;

import com.alibaba.fastjson.annotation.JSONField;

import java.io.Serializable;

/**
 * @Author: chchen
 * @Description
 * @Date Create in 14:49 2020/3/25
 * @Modified By
 */
public class KmtTeacherDetailDto implements Serializable {


    private static final long serialVersionUID = 1L;

    private String detailId;

    private String detailName;

    private String grade;

    private int semester;

    private String courseName;

    @JSONField(serialize = false)
    private int versionType;

    private String versionName;

    private Integer unFinishCount;

    private Integer totalCount;

    @JSONField(serialize = false)
    private Integer rollbackQuestion;

    private Integer haveRollbackQuestions;

    private Integer questionTotalCount;

    private Integer questionUnfinishCount;

    public Integer getQuestionTotalCount() {
        return questionTotalCount;
    }

    public void setQuestionTotalCount(Integer questionTotalCount) {
        this.questionTotalCount = questionTotalCount;
    }

    public Integer getQuestionUnfinishCount() {
        return questionUnfinishCount;
    }

    public void setQuestionUnfinishCount(Integer questionUnfinishCount) {
        this.questionUnfinishCount = questionUnfinishCount;
    }

    public String getDetailId() {
        return detailId;
    }

    public void setDetailId(String detailId) {
        this.detailId = detailId;
    }

    public String getDetailName() {
        return detailName;
    }

    public void setDetailName(String detailName) {
        this.detailName = detailName;
    }

    public String getGrade() {
        return grade;
    }

    public void setGrade(String grade) {
        this.grade = grade;
    }

    public int getSemester() {
        return semester;
    }

    public void setSemester(int semester) {
        this.semester = semester;
    }

    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    public int getVersionType() {
        return versionType;
    }

    public void setVersionType(int versionType) {
        this.versionType = versionType;
    }

    public String getVersionName() {
        return versionName;
    }

    public void setVersionName(String versionName) {
        this.versionName = versionName;
    }

    public Integer getUnFinishCount() {
        return unFinishCount;
    }

    public void setUnFinishCount(Integer unFinishCount) {
        if (unFinishCount == null){
            this.unFinishCount = 0;
        } else {
            this.unFinishCount = unFinishCount;
        }
    }

    public Integer getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(Integer totalCount) {
        if (totalCount == null){
            this.totalCount = 0;
        } else {
            this.totalCount = totalCount;
        }
    }

    public Integer getRollbackQuestion() {
        return rollbackQuestion;
    }

    public void setRollbackQuestion(Integer rollbackQuestion) {
        this.rollbackQuestion = rollbackQuestion;
    }

    public Integer getHaveRollbackQuestions() {
        if (haveRollbackQuestions != null) {
            return haveRollbackQuestions;
        }

        if (rollbackQuestion != null  && rollbackQuestion > 0){
            haveRollbackQuestions = 1;
        } else {
            haveRollbackQuestions = 0;
        }

        return haveRollbackQuestions;
    }

    public void setHaveRollbackQuestions(Integer haveRollbackQuestions) {
        this.haveRollbackQuestions = haveRollbackQuestions;
    }
}
