package cn.com.qmth.examcloud.core.questions.service.bean.dto;


import java.io.Serializable;
import java.util.List;

/**
 * 试卷大题导出dto
 * Created by songyue on 17/3/15.
 */
public class PaperDetailExp implements Serializable, Comparable<PaperDetailExp> {
    private static final long serialVersionUID = -3520871668728091404L;

    private String id;

    private Integer number;//大题序号

    private String cnNum;//中文序号

    private String name;//大题名称

    private String title;//大题标题

    private String titleDetail;//标题详情

    private Double score;//大题分数

    private Integer unitCount;//大题下的小题数量

    private List<PaperDetailUnitExp> paperDetailUnits;
    
    
    private List<Long> questionTypes;
    
    private boolean nested;
    
    /**
     * 导出成卷时是否重置本大题的小题题序
     */
    private Boolean resetSubQuesSeq;

    /**
     * 大题排序
     */
    private Long sortNumber;

    /**
     * 导入模板中，【分数】
     * （默认取第一个子题分数）
     */
    private Double firstScore;

    /**
     * 题型
     */
    private String quesType;

    public String getTitleDetail() {
        return titleDetail;
    }

    public void setTitleDetail(String titleDetail) {
        this.titleDetail = titleDetail;
    }

    public Long getSortNumber() {
        return sortNumber;
    }

    public void setSortNumber(Long sortNumber) {
        this.sortNumber = sortNumber;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Integer getNumber() {
        return number;
    }

    public void setNumber(Integer number) {
        this.number = number;
    }

    public String getCnNum() {
        return cnNum;
    }

    public void setCnNum(String cnNum) {
        this.cnNum = cnNum;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Double getScore() {
        return score;
    }

    public void setScore(Double score) {
        this.score = score;
    }

    public Integer getUnitCount() {
        return unitCount;
    }

    public void setUnitCount(Integer unitCount) {
        this.unitCount = unitCount;
    }

    public List<PaperDetailUnitExp> getPaperDetailUnits() {
        return paperDetailUnits;
    }

    public void setPaperDetailUnits(List<PaperDetailUnitExp> paperDetailUnits) {
        this.paperDetailUnits = paperDetailUnits;
    }

    public String getTitle() {
        return title;
    }

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

    public Double getFirstScore() {
        return firstScore;
    }

    public void setFirstScore(Double firstScore) {
        this.firstScore = firstScore;
    }

    public String getQuesType() {
        return quesType;
    }

    public void setQuesType(String quesType) {
        this.quesType = quesType;
    }

    @Override
    public int compareTo(PaperDetailExp paperDetailExp) {
        if (paperDetailExp != null) {
            if (this.getNumber() == null) return -1;
            if (paperDetailExp.getNumber() == null) return 1;
            if (this.getNumber() > paperDetailExp.getNumber()) {
                return 1;
            } else if (this.getNumber() < paperDetailExp.getNumber()) {
                return -1;
            } else {
                return 0;
            }
        }
        return -1;
    }

	public Boolean isResetSubQuesSeq() {
		return resetSubQuesSeq;
	}

	public void setResetSubQuesSeq(Boolean resetSubQuesSeq) {
		this.resetSubQuesSeq = resetSubQuesSeq;
	}


	public boolean isNested() {
		return nested;
	}

	public void setNested(boolean nested) {
		this.nested = nested;
	}

	public List<Long> getQuestionTypes() {
		return questionTypes;
	}

	public void setQuestionTypes(List<Long> questionTypes) {
		this.questionTypes = questionTypes;
	}

    
}

