|
@@ -1,9 +1,15 @@
|
|
|
package cn.reghao.tnb.content.app.exam.model.po;
|
|
package cn.reghao.tnb.content.app.exam.model.po;
|
|
|
|
|
|
|
|
import cn.reghao.jutil.jdk.db.BaseObject;
|
|
import cn.reghao.jutil.jdk.db.BaseObject;
|
|
|
|
|
+import cn.reghao.tnb.content.app.exam.model.constant.QuestionLevel;
|
|
|
|
|
+import cn.reghao.tnb.content.app.exam.model.constant.QuestionType;
|
|
|
import cn.reghao.tnb.content.app.exam.model.dto.QuestionAddDto;
|
|
import cn.reghao.tnb.content.app.exam.model.dto.QuestionAddDto;
|
|
|
import lombok.Getter;
|
|
import lombok.Getter;
|
|
|
import lombok.NoArgsConstructor;
|
|
import lombok.NoArgsConstructor;
|
|
|
|
|
+import lombok.Setter;
|
|
|
|
|
+
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
|
|
+import java.util.List;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 试题
|
|
* 试题
|
|
@@ -13,6 +19,7 @@ import lombok.NoArgsConstructor;
|
|
|
*/
|
|
*/
|
|
|
@NoArgsConstructor
|
|
@NoArgsConstructor
|
|
|
@Getter
|
|
@Getter
|
|
|
|
|
+@Setter
|
|
|
public class Question extends BaseObject<Integer> {
|
|
public class Question extends BaseObject<Integer> {
|
|
|
private Integer subjectId;
|
|
private Integer subjectId;
|
|
|
private Integer type;
|
|
private Integer type;
|
|
@@ -23,6 +30,21 @@ public class Question extends BaseObject<Integer> {
|
|
|
private Integer pid;
|
|
private Integer pid;
|
|
|
private Boolean child;
|
|
private Boolean child;
|
|
|
private Integer pos;
|
|
private Integer pos;
|
|
|
|
|
+ private String extra;
|
|
|
|
|
+ private transient List<QuestionOption> questionOptions;
|
|
|
|
|
+
|
|
|
|
|
+ public Question(int id, String content, int questionType, String extra) {
|
|
|
|
|
+ this.id = id;
|
|
|
|
|
+ this.subjectId = 1;
|
|
|
|
|
+ this.type = questionType;
|
|
|
|
|
+ this.level = QuestionLevel.EASY.getCode();
|
|
|
|
|
+ this.content = content;
|
|
|
|
|
+ this.analysis = "";
|
|
|
|
|
+ this.pid = 0;
|
|
|
|
|
+ this.child = false;
|
|
|
|
|
+ this.pos = 0;
|
|
|
|
|
+ this.extra = extra;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
public Question(QuestionAddDto questionAddDto) {
|
|
public Question(QuestionAddDto questionAddDto) {
|
|
|
this.subjectId = questionAddDto.getSubjectId();
|
|
this.subjectId = questionAddDto.getSubjectId();
|