|
|
@ -1,12 +1,5 @@
|
|
|
|
/***********************************************************
|
|
|
|
|
|
|
|
* @Description : 考试题目表
|
|
|
|
|
|
|
|
* @author : 梁山广(Laing Shan Guang)
|
|
|
|
|
|
|
|
* @date : 2019/5/14 07:46
|
|
|
|
|
|
|
|
* @email : liangshanguang2@gmail.com
|
|
|
|
|
|
|
|
***********************************************************/
|
|
|
|
|
|
|
|
package lsgwr.exam.entity;
|
|
|
|
package lsgwr.exam.entity;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
|
|
import lombok.Data;
|
|
|
|
import lombok.Data;
|
|
|
|
import org.hibernate.annotations.DynamicUpdate;
|
|
|
|
import org.hibernate.annotations.DynamicUpdate;
|
|
|
@ -15,25 +8,70 @@ import javax.persistence.Entity;
|
|
|
|
import javax.persistence.Id;
|
|
|
|
import javax.persistence.Id;
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.Date;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Question实体类,用于表示考试题目信息
|
|
|
|
|
|
|
|
* 该类使用了Lombok的@Data注解自动生成getter和setter方法,
|
|
|
|
|
|
|
|
* 以及Hibernate的@Entity注解表明这是一个JPA实体类
|
|
|
|
|
|
|
|
* @DynamicUpdate注解用于在更新实体时只更新发生变化的字段
|
|
|
|
|
|
|
|
*/
|
|
|
|
@Data
|
|
|
|
@Data
|
|
|
|
@Entity
|
|
|
|
@Entity
|
|
|
|
@DynamicUpdate
|
|
|
|
@DynamicUpdate
|
|
|
|
public class Question {
|
|
|
|
public class Question {
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 题目ID,主键
|
|
|
|
|
|
|
|
*/
|
|
|
|
@Id
|
|
|
|
@Id
|
|
|
|
private String questionId;
|
|
|
|
private String questionId;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 题目名称
|
|
|
|
|
|
|
|
*/
|
|
|
|
private String questionName;
|
|
|
|
private String questionName;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 题目分数
|
|
|
|
|
|
|
|
*/
|
|
|
|
private Integer questionScore;
|
|
|
|
private Integer questionScore;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 创建题目的用户ID
|
|
|
|
|
|
|
|
*/
|
|
|
|
private String questionCreatorId;
|
|
|
|
private String questionCreatorId;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 题目难度等级ID
|
|
|
|
|
|
|
|
*/
|
|
|
|
private Integer questionLevelId;
|
|
|
|
private Integer questionLevelId;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 题目类型ID
|
|
|
|
|
|
|
|
*/
|
|
|
|
private Integer questionTypeId;
|
|
|
|
private Integer questionTypeId;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 题目分类ID
|
|
|
|
|
|
|
|
*/
|
|
|
|
private Integer questionCategoryId;
|
|
|
|
private Integer questionCategoryId;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 题目描述
|
|
|
|
|
|
|
|
*/
|
|
|
|
private String questionDescription;
|
|
|
|
private String questionDescription;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 题目选项IDs
|
|
|
|
|
|
|
|
*/
|
|
|
|
private String questionOptionIds;
|
|
|
|
private String questionOptionIds;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 题目答案选项IDs
|
|
|
|
|
|
|
|
*/
|
|
|
|
private String questionAnswerOptionIds;
|
|
|
|
private String questionAnswerOptionIds;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 创建时间, 设计表时设置了自动插入当前时间,无需在Java代码中设置了
|
|
|
|
* 创建时间, 设计表时设置了自动插入当前时间,无需在Java代码中设置了
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
|
|
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
|
|
|
private Date createTime;
|
|
|
|
private Date createTime;
|
|
|
|
|
|
|
|
|
|
|
|