You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
spring-boot-online-exam/backend/src/main/java/lsgwr/exam/entity/Question.java

59 lines
1.7 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

/***********************************************************
* @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;
}