package cn.com.qmth.stmms.admin.dto;

import org.apache.commons.lang.StringUtils;

import cn.com.qmth.stmms.common.annotation.ExcelField;

public class SubjectiveQuestionDTO2 {

    @ExcelField(title = "科目代码", align = 2, sort = 10)
    private String subjectCode;

    @ExcelField(title = "大题名称", align = 2, sort = 20)
    private String title;

    @ExcelField(title = "大题号", align = 2, sort = 30)
    private Integer mainNumber;

    @ExcelField(title = "小题名称", align = 2, sort = 40)
    private String subTitle;

    @ExcelField(title = "最低分", align = 2, sort = 50)
    private Double minScore;

    @ExcelField(title = "小题满分", align = 2, sort = 60)
    private Double totalScore;

    @ExcelField(title = "分值间隔", align = 2, sort = 70)
    private Double interval;

    public boolean validate() {
        if (StringUtils.isBlank(subjectCode)) {
            return false;
        }
        if (StringUtils.isBlank(title)) {
            return false;
        }
        if (StringUtils.isBlank(subTitle)) {
            return false;
        }
        if (mainNumber == null || totalScore == null) {
            return false;
        }
        return true;
    }

    public String getSubjectCode() {
        return subjectCode;
    }

    public void setSubjectCode(String subjectCode) {
        this.subjectCode = subjectCode;
    }

    public Integer getMainNumber() {
        return mainNumber;
    }

    public void setMainNumber(Integer mainNumber) {
        this.mainNumber = mainNumber;
    }

    public Double getTotalScore() {
        return totalScore;
    }

    public void setTotalScore(Double totalScore) {
        this.totalScore = totalScore;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getSubTitle() {
        return subTitle;
    }

    public void setSubTitle(String subTitle) {
        this.subTitle = subTitle;
    }

    public Double getMinScore() {
        return minScore;
    }

    public void setMinScore(Double minScore) {
        this.minScore = minScore;
    }

    public Double getInterval() {
        return interval;
    }

    public void setInterval(Double interval) {
        this.interval = interval;
    }

}
