package com.mindskip.xzs.domain;
|
|
import com.mindskip.xzs.domain.enums.QuestionTypeEnum;
|
import com.mindskip.xzs.utility.ExamUtil;
|
|
import java.io.Serializable;
|
import java.util.Date;
|
import java.util.List;
|
|
/**
|
* @version 2.2.0
|
* @description: 题目
|
* Copyright (C), 2020-2021, 武汉思维跳跃科技有限公司
|
* @date 2021 /9/7 9:45
|
*/
|
public class Question implements Serializable {
|
|
private static final long serialVersionUID = 8826266720383164363L;
|
|
private Integer id;
|
|
/**
|
* 题目类型
|
*/
|
private Integer questionType;
|
|
/**
|
* 学科
|
*/
|
private Integer subjectId;
|
|
/**
|
* 分数
|
*/
|
private Integer score;
|
|
/**
|
* 年级
|
*/
|
private Integer gradeLevel;
|
|
/**
|
* 难度
|
*/
|
private Integer difficult;
|
|
/**
|
* 标答
|
*/
|
private String correct;
|
|
/**
|
* 题目内容
|
*/
|
private Integer infoTextContentId;
|
|
/**
|
* 创建人
|
*/
|
private Integer createUser;
|
|
/**
|
* 状态
|
*/
|
private Integer status;
|
|
/**
|
* 创建时间
|
*/
|
private Date createTime;
|
|
/**
|
* 是否删除
|
*/
|
private Boolean deleted;
|
|
/**
|
* Gets id.
|
*
|
* @return the id
|
*/
|
public Integer getId() {
|
return id;
|
}
|
|
/**
|
* Sets id.
|
*
|
* @param id the id
|
*/
|
public void setId(Integer id) {
|
this.id = id;
|
}
|
|
/**
|
* Gets question type.
|
*
|
* @return the question type
|
*/
|
public Integer getQuestionType() {
|
return questionType;
|
}
|
|
/**
|
* Sets question type.
|
*
|
* @param questionType the question type
|
*/
|
public void setQuestionType(Integer questionType) {
|
this.questionType = questionType;
|
}
|
|
/**
|
* Gets subject id.
|
*
|
* @return the subject id
|
*/
|
public Integer getSubjectId() {
|
return subjectId;
|
}
|
|
/**
|
* Sets subject id.
|
*
|
* @param subjectId the subject id
|
*/
|
public void setSubjectId(Integer subjectId) {
|
this.subjectId = subjectId;
|
}
|
|
/**
|
* Gets score.
|
*
|
* @return the score
|
*/
|
public Integer getScore() {
|
return score;
|
}
|
|
/**
|
* Sets score.
|
*
|
* @param score the score
|
*/
|
public void setScore(Integer score) {
|
this.score = score;
|
}
|
|
/**
|
* Gets grade level.
|
*
|
* @return the grade level
|
*/
|
public Integer getGradeLevel() {
|
return gradeLevel;
|
}
|
|
/**
|
* Sets grade level.
|
*
|
* @param gradeLevel the grade level
|
*/
|
public void setGradeLevel(Integer gradeLevel) {
|
this.gradeLevel = gradeLevel;
|
}
|
|
/**
|
* Gets difficult.
|
*
|
* @return the difficult
|
*/
|
public Integer getDifficult() {
|
return difficult;
|
}
|
|
/**
|
* Sets difficult.
|
*
|
* @param difficult the difficult
|
*/
|
public void setDifficult(Integer difficult) {
|
this.difficult = difficult;
|
}
|
|
/**
|
* Gets correct.
|
*
|
* @return the correct
|
*/
|
public String getCorrect() {
|
return correct;
|
}
|
|
/**
|
* Sets correct.
|
*
|
* @param correct the correct
|
*/
|
public void setCorrect(String correct) {
|
this.correct = correct == null ? null : correct.trim();
|
}
|
|
/**
|
* Gets info text content id.
|
*
|
* @return the info text content id
|
*/
|
public Integer getInfoTextContentId() {
|
return infoTextContentId;
|
}
|
|
/**
|
* Sets info text content id.
|
*
|
* @param infoTextContentId the info text content id
|
*/
|
public void setInfoTextContentId(Integer infoTextContentId) {
|
this.infoTextContentId = infoTextContentId;
|
}
|
|
/**
|
* Gets create user.
|
*
|
* @return the create user
|
*/
|
public Integer getCreateUser() {
|
return createUser;
|
}
|
|
/**
|
* Sets create user.
|
*
|
* @param createUser the create user
|
*/
|
public void setCreateUser(Integer createUser) {
|
this.createUser = createUser;
|
}
|
|
/**
|
* Gets status.
|
*
|
* @return the status
|
*/
|
public Integer getStatus() {
|
return status;
|
}
|
|
/**
|
* Sets status.
|
*
|
* @param status the status
|
*/
|
public void setStatus(Integer status) {
|
this.status = status;
|
}
|
|
/**
|
* Gets create time.
|
*
|
* @return the create time
|
*/
|
public Date getCreateTime() {
|
return createTime;
|
}
|
|
/**
|
* Sets create time.
|
*
|
* @param createTime the create time
|
*/
|
public void setCreateTime(Date createTime) {
|
this.createTime = createTime;
|
}
|
|
/**
|
* Gets deleted.
|
*
|
* @return the deleted
|
*/
|
public Boolean getDeleted() {
|
return deleted;
|
}
|
|
/**
|
* Sets deleted.
|
*
|
* @param deleted the deleted
|
*/
|
public void setDeleted(Boolean deleted) {
|
this.deleted = deleted;
|
}
|
|
|
/**
|
* Sets correct from vm.
|
*
|
* @param correct the correct
|
* @param correctArray the correct array
|
*/
|
public void setCorrectFromVM(String correct, List<String> correctArray) {
|
int qType = this.getQuestionType();
|
if (qType == QuestionTypeEnum.MultipleChoice.getCode()) {
|
String correctJoin = ExamUtil.contentToString(correctArray);
|
this.setCorrect(correctJoin);
|
} else {
|
this.setCorrect(correct);
|
}
|
}
|
}
|