|
|
/***********************************************************
|
|
|
* @Description : 考试题目表
|
|
|
* @author : 梁山广(Laing Shan Guang)
|
|
|
* @date : 2019/5/14 07:46
|
|
|
* @email : liangshanguang2@gmail.com
|
|
|
***********************************************************/
|
|
|
package lsgwr.exam.entity;
|
|
|
|
|
|
|
|
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
|
import lombok.Data;
|
|
|
import org.hibernate.annotations.DynamicUpdate;
|
|
|
|
|
|
import javax.persistence.Entity;
|
|
|
import javax.persistence.Id;
|
|
|
import java.util.Date;
|
|
|
|
|
|
@Data
|
|
|
@Entity
|
|
|
@DynamicUpdate
|
|
|
public class Question {
|
|
|
// 问题ID
|
|
|
@Id
|
|
|
private String questionId;
|
|
|
// 问题名称
|
|
|
private String questionName;
|
|
|
// 问题分数
|
|
|
private Integer questionScore;
|
|
|
// 问题创建者ID
|
|
|
private String questionCreatorId;
|
|
|
// 问题等级ID
|
|
|
private Integer questionLevelId;
|
|
|
// 问题类型ID
|
|
|
private Integer questionTypeId;
|
|
|
// 问题分类ID
|
|
|
private Integer questionCategoryId;
|
|
|
// 问题描述
|
|
|
private String questionDescription;
|
|
|
// 问题选项ID
|
|
|
private String questionOptionIds;
|
|
|
// 问题答案选项ID
|
|
|
private String questionAnswerOptionIds;
|
|
|
/**
|
|
|
* 创建时间, 设计表时设置了自动插入当前时间,无需在Java代码中设置了
|
|
|
*/
|
|
|
|
|
|
// 创建时间格式化
|
|
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
|
|
private Date createTime;
|
|
|
|
|
|
/**
|
|
|
* 更新时间,设计表时设置了自动插入当前时间,无需在Java代码中设置了。
|
|
|
* 同时@DynamicUpdate注解可以时间当数据库数据变化时自动更新,无需人工维护
|
|
|
*/
|
|
|
// 更新时间格式化
|
|
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
|
|
private Date updateTime;
|
|
|
}
|