package com.ssj.service.conch.parents.v2.dto;

import com.alibaba.fastjson.annotation.JSONField;
import com.ssj.framework.core.util.Constant;

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

/**
 * @author yrf
 * @time 2019/12/18 21:03
 */
public class TrainRecommendQuestionDTO implements Serializable {

    private static final long serialVersionUID = 1023056215317123924L;

    private String id;
    private String question;
    private String analysis;
    private String optionAnswer;

    @JSONField(serialize = false)
    private String answerJson;

    private Integer difficulty;

    @JSONField(serialize = false)
    private Integer optionTypeInt;

    @JSONField(serialize = false)
    private String courseName;

    @JSONField(serialize = false)
    private Integer num;

    @JSONField(serialize = false)
    private Integer questionClassType;

    @JSONField(serialize = false)
    private Boolean contentEmpty = false;

    private String optionType;
    private List<TrainRecommendQuestionDTO> childList;

    public String getId() {
        return id;
    }

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

    public String getQuestion() {
        return question;
    }

    public void setQuestion(String question) {
        this.question = question;
    }

    public String getAnalysis() {
        return analysis;
    }

    public void setAnalysis(String analysis) {
        this.analysis = analysis;
    }

    public String getOptionAnswer() {
        return optionAnswer;
    }

    public void setOptionAnswer(String optionAnswer) {
        this.optionAnswer = optionAnswer;
    }

    public String getAnswerJson() {
        return answerJson;
    }

    public void setAnswerJson(String answerJson) {
        this.answerJson = answerJson;
    }

    public Integer getDifficulty() {
        return difficulty;
    }

    public void setDifficulty(Integer difficulty) {
        this.difficulty = difficulty;
    }

    public Integer getOptionTypeInt() {
        return optionTypeInt;
    }

    public void setOptionTypeInt(Integer optionTypeInt) {
        this.optionTypeInt = optionTypeInt;
    }

    public String getCourseName() {
        return courseName;
    }

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

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public Integer getQuestionClassType() {
        return questionClassType;
    }

    public void setQuestionClassType(Integer questionClassType) {
        this.questionClassType = questionClassType;
    }

    public Boolean getContentEmpty() {
        return contentEmpty;
    }

    public void setContentEmpty(Boolean contentEmpty) {
        this.contentEmpty = contentEmpty;
    }

    public String getOptionType() {
        if (optionTypeInt != null) {
            return Constant.QUESTION_TYPE_MAP.get(optionTypeInt);
        }
        return optionType;
    }

    public void setOptionType(String optionType) {
        this.optionType = optionType;
    }

    public List<TrainRecommendQuestionDTO> getChildList() {
        return childList;
    }

    public void setChildList(List<TrainRecommendQuestionDTO> childList) {
        this.childList = childList;
    }
}
