package com.ssj.service.conch.opentest.request;

import com.ssj.bean.common.framework.core.domain.BaseRequest;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.NotBlank;

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

/**
 * @author Mount Liu
 * @date 2020/5/6
 */
public class SaveResultV1Req extends BaseRequest {

    private static final long serialVersionUID = -3599279164102187917L;

    @ApiModelProperty(name = "type", value = "类型(1:学前;2:单元,3:期中)", required = true)
    private int type;

    @ApiModelProperty(name = "duration", value = "用时（秒）", required = true)
    private Integer duration;

    @ApiModelProperty(name = "answer", value = "回答(示例：”1,1,字词;2,2,字词;3,3,字词;4,1,字词;5:2,字词”) 用“题号,答题情况,知识模块;题号,答题情况,知识模块”这种格式，答题情况（1：正确，2：错误，3：未答题）", required = true)
    private String answer;

    @NotBlank
    @ApiModelProperty(name = "answerList", value = "回答(示例：”1,1,字词;2,2,字词;3,3,字词;4,1,字词;5:2,字词”) 用“题号,答题情况,知识模块;题号,答题情况,知识模块”这种格式，答题情况（1：正确，2：错误，3：未答题）", required = true)
    private List<AnswerReq> answerList;

    @NotBlank
    @ApiModelProperty(name = "grade", value = "年级", required = true)
    private String grade;

    @NotBlank
    @ApiModelProperty(name = "subject", value = "学科", required = true)
    private String subject;

    @ApiModelProperty(name = "version", value = "版本", required = true)
    private String version;

    @ApiModelProperty(name = "unit", value = "单元", required = true)
    private String unit;

    @ApiModelProperty(name = "updateVersion", value = "更新的版本号", required = true)
    private int updateVersion;

    @ApiModelProperty(name = "semester", value = "学期", required = true)
    private String semester;

    public class AnswerReq implements Serializable {

        private static final long serialVersionUID = 1L;

        @ApiModelProperty(name = "questionId", value = "问题id", required = true)
        private String questionId;
        @ApiModelProperty(name = "questionNo", value = "题号", required = true)
        private Integer questionNo;
        @ApiModelProperty(name = "answer", value = "回答", required = true)
        private String answer;
        @ApiModelProperty(name = "situation", value = "回答情况", required = true)
        private int situation;
        @ApiModelProperty(name = "module", value = "回答", required = true)
        private String module;

        public String getQuestionId() {
            return questionId;
        }

        public void setQuestionId(String questionId) {
            this.questionId = questionId;
        }

        public Integer getQuestionNo() {
            return questionNo;
        }

        public void setQuestionNo(Integer questionNo) {
            this.questionNo = questionNo;
        }

        public String getAnswer() {
            return answer;
        }

        public void setAnswer(String answer) {
            this.answer = answer;
        }

        public int getSituation() {
            return situation;
        }

        public void setSituation(int situation) {
            this.situation = situation;
        }

        public String getModule() {
            return module;
        }

        public void setModule(String module) {
            this.module = module;
        }
    }

    public int getUpdateVersion() {
        return updateVersion;
    }

    public void setUpdateVersion(int updateVersion) {
        this.updateVersion = updateVersion;
    }

    public String getGrade() {
        return grade;
    }

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

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getAnswer() {
        return answer;
    }

    public void setAnswer(String answer) {
        this.answer = answer;
    }

    public List<AnswerReq> getAnswerList() {
        return answerList;
    }

    public void setAnswerList(List<AnswerReq> answerList) {
        this.answerList = answerList;
    }

    public Integer getDuration() {
        return duration;
    }

    public void setDuration(Integer duration) {
        this.duration = duration;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getSemester() {
        return semester;
    }

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