package cn.com.qmth.examcloud.core.questions.dao.entity;

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

import org.docx4j.openpackaging.packages.WordprocessingMLPackage;

import cn.com.qmth.examcloud.core.questions.base.CommonUtils;
import cn.com.qmth.examcloud.core.questions.base.question.enums.QuesStructType;
import cn.com.qmth.examcloud.core.questions.dao.entity.base.MongoBaseEntity;

public class QuestionBak extends MongoBaseEntity {

    /**
	 * 
	 */
	private static final long serialVersionUID = -2952550503209263454L;

	private String quesBody;// 题干,默认为html

    private String quesBodyWord;// 题干word

    private byte[] quesPkg;// 试题wordpkg对象序列化数据

    private String quesAnswer;// 答案,默认为html

    private String quesAnswerWord;// 答案word

    private String quesAnswerAnalysis;// 答案解析,默认为html

    private String quesAnswerAnalysisWord;// 答案word解析

    private List<QuesOption> quesOptions;// 试题选项

    private List<QuesResource> quesResource;// 试题resource(试题资源库集合,适用于多媒体介质试题)

    private QuesStructType questionType;// 试题结构类型

    private String createTime;// 创建时间

    private String updateTime;// 更新时间

    private List<Question> subQuestions;// 子题目,用于套题

    private Double score;// 预设分值

    private String courseNo;// 课程CODE

    private String courseName;// 课程名称

    private String orgId; // 机构ID

    private Map<String, String> quesParams;// 试题属性

    public String getQuesBody() {
        return quesBody;
    }

    public void setQuesBody(String quesBody) {
        this.quesBody = quesBody;
    }

    public String getQuesBodyWord() {
        return quesBodyWord;
    }

    public void setQuesBodyWord(String quesBodyWord) {
        this.quesBodyWord = quesBodyWord;
    }

    public String getQuesAnswer() {
        return quesAnswer;
    }

    public void setQuesAnswer(String quesAnswer) {
        this.quesAnswer = quesAnswer;
    }

    public String getQuesAnswerWord() {
        return quesAnswerWord;
    }

    public void setQuesAnswerWord(String quesAnswerWord) {
        this.quesAnswerWord = quesAnswerWord;
    }

    public String getQuesAnswerAnalysis() {
        return quesAnswerAnalysis;
    }

    public void setQuesAnswerAnalysis(String quesAnswerAnalysis) {
        this.quesAnswerAnalysis = quesAnswerAnalysis;
    }

    public String getQuesAnswerAnalysisWord() {
        return quesAnswerAnalysisWord;
    }

    public void setQuesAnswerAnalysisWord(String quesAnswerAnalysisWord) {
        this.quesAnswerAnalysisWord = quesAnswerAnalysisWord;
    }

    public List<QuesOption> getQuesOptions() {
        return quesOptions;
    }

    public void setQuesOptions(List<QuesOption> quesOptions) {
        this.quesOptions = quesOptions;
    }

    public List<QuesResource> getQuesResource() {
        return quesResource;
    }

    public void setQuesResource(List<QuesResource> quesResource) {
        this.quesResource = quesResource;
    }

    public QuesStructType getQuestionType() {
        return questionType;
    }

    public void setQuestionType(QuesStructType questionType) {
        this.questionType = questionType;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    public List<Question> getSubQuestions() {
        return subQuestions;
    }

    public void setSubQuestions(List<Question> subQuestions) {
        this.subQuestions = subQuestions;
    }

    public Map<String, String> getQuesParams() {
        return quesParams;
    }

    public void setQuesParams(Map<String, String> quesParams) {
        this.quesParams = quesParams;
    }

    public byte[] getQuesPkg() {
        return quesPkg;
    }

    public WordprocessingMLPackage getPkgObj() {
//        if (this.quesPkg != null && this.quesPkg.length > 0) {
//            return DocxProcessUtil.getPkg(this.quesPkg);
//        } else {
            return null;
//        }

    }

    public void setQuesPkg(byte[] quesPkg) {
        this.quesPkg = quesPkg;
    }

    public Double getScore() {
        return score;
    }

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

    public QuestionBak() {
        this.createTime = CommonUtils.getCurDateTime();
    }

    public String getCourseNo() {
        return courseNo;
    }

    public void setCourseNo(String courseNo) {
        this.courseNo = courseNo;
    }

    public String getCourseName() {
        return courseName;
    }

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

    public String getOrgId() {
        return orgId;
    }

    public void setOrgId(String orgId) {
        this.orgId = orgId;
    }

}
