123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406 |
- package com.qxgmat.data.dao.entity;
- import com.alibaba.fastjson.JSONObject;
- import java.io.Serializable;
- import java.util.Date;
- import javax.persistence.*;
- @Table(name = "user_question")
- public class UserQuestion implements Serializable {
- @Id
- @Column(name = "`id`")
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- private Integer id;
- /**
- * 用户id
- */
- @Column(name = "`user_id`")
- private Integer userId;
- /**
- * 报告id
- */
- @Column(name = "`report_id`")
- private Integer reportId;
- /**
- * 题目id
- */
- @Column(name = "`question_id`")
- private Integer questionId;
- /**
- * 题目编号id
- */
- @Column(name = "`question_no_id`")
- private Integer questionNoId;
- /**
- * 系统定义时间
- */
- @Column(name = "`time`")
- private Integer time;
- /**
- * 用户用时
- */
- @Column(name = "`user_time`")
- private Integer userTime;
- @Column(name = "`create_time`")
- private Date createTime;
- /**
- * 系统答案:json
- */
- @Column(name = "`answer`")
- private JSONObject answer;
- /**
- * 用户答案:json
- */
- @Column(name = "`user_answer`")
- private JSONObject userAnswer;
- /**
- * 正确:0错误,1正确
- */
- @Column(name = "`is_correct`")
- private Integer isCorrect;
- private static final long serialVersionUID = 1L;
- /**
- * @return id
- */
- public Integer getId() {
- return id;
- }
- /**
- * @param id
- */
- public void setId(Integer id) {
- this.id = id;
- }
- /**
- * 获取用户id
- *
- * @return user_id - 用户id
- */
- public Integer getUserId() {
- return userId;
- }
- /**
- * 设置用户id
- *
- * @param userId 用户id
- */
- public void setUserId(Integer userId) {
- this.userId = userId;
- }
- /**
- * 获取报告id
- *
- * @return report_id - 报告id
- */
- public Integer getReportId() {
- return reportId;
- }
- /**
- * 设置报告id
- *
- * @param reportId 报告id
- */
- public void setReportId(Integer reportId) {
- this.reportId = reportId;
- }
- /**
- * 获取题目id
- *
- * @return question_id - 题目id
- */
- public Integer getQuestionId() {
- return questionId;
- }
- /**
- * 设置题目id
- *
- * @param questionId 题目id
- */
- public void setQuestionId(Integer questionId) {
- this.questionId = questionId;
- }
- /**
- * 获取题目编号id
- *
- * @return question_no_id - 题目编号id
- */
- public Integer getQuestionNoId() {
- return questionNoId;
- }
- /**
- * 设置题目编号id
- *
- * @param questionNoId 题目编号id
- */
- public void setQuestionNoId(Integer questionNoId) {
- this.questionNoId = questionNoId;
- }
- /**
- * 获取系统定义时间
- *
- * @return time - 系统定义时间
- */
- public Integer getTime() {
- return time;
- }
- /**
- * 设置系统定义时间
- *
- * @param time 系统定义时间
- */
- public void setTime(Integer time) {
- this.time = time;
- }
- /**
- * 获取用户用时
- *
- * @return user_time - 用户用时
- */
- public Integer getUserTime() {
- return userTime;
- }
- /**
- * 设置用户用时
- *
- * @param userTime 用户用时
- */
- public void setUserTime(Integer userTime) {
- this.userTime = userTime;
- }
- /**
- * @return create_time
- */
- public Date getCreateTime() {
- return createTime;
- }
- /**
- * @param createTime
- */
- public void setCreateTime(Date createTime) {
- this.createTime = createTime;
- }
- /**
- * 获取系统答案:json
- *
- * @return answer - 系统答案:json
- */
- public JSONObject getAnswer() {
- return answer;
- }
- /**
- * 设置系统答案:json
- *
- * @param answer 系统答案:json
- */
- public void setAnswer(JSONObject answer) {
- this.answer = answer;
- }
- /**
- * 获取用户答案:json
- *
- * @return user_answer - 用户答案:json
- */
- public JSONObject getUserAnswer() {
- return userAnswer;
- }
- /**
- * 设置用户答案:json
- *
- * @param userAnswer 用户答案:json
- */
- public void setUserAnswer(JSONObject userAnswer) {
- this.userAnswer = userAnswer;
- }
- /**
- * 获取正确:0错误,1正确
- *
- * @return is_correct - 正确:0错误,1正确
- */
- public Integer getIsCorrect() {
- return isCorrect;
- }
- /**
- * 设置正确:0错误,1正确
- *
- * @param isCorrect 正确:0错误,1正确
- */
- public void setIsCorrect(Integer isCorrect) {
- this.isCorrect = isCorrect;
- }
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append(getClass().getSimpleName());
- sb.append(" [");
- sb.append("Hash = ").append(hashCode());
- sb.append(", id=").append(id);
- sb.append(", userId=").append(userId);
- sb.append(", reportId=").append(reportId);
- sb.append(", questionId=").append(questionId);
- sb.append(", questionNoId=").append(questionNoId);
- sb.append(", time=").append(time);
- sb.append(", userTime=").append(userTime);
- sb.append(", createTime=").append(createTime);
- sb.append(", answer=").append(answer);
- sb.append(", userAnswer=").append(userAnswer);
- sb.append(", isCorrect=").append(isCorrect);
- sb.append("]");
- return sb.toString();
- }
- public static UserQuestion.Builder builder() {
- return new UserQuestion.Builder();
- }
- public static class Builder {
- private UserQuestion obj;
- public Builder() {
- this.obj = new UserQuestion();
- }
- /**
- * @param id
- */
- public Builder id(Integer id) {
- obj.setId(id);
- return this;
- }
- /**
- * 设置用户id
- *
- * @param userId 用户id
- */
- public Builder userId(Integer userId) {
- obj.setUserId(userId);
- return this;
- }
- /**
- * 设置报告id
- *
- * @param reportId 报告id
- */
- public Builder reportId(Integer reportId) {
- obj.setReportId(reportId);
- return this;
- }
- /**
- * 设置题目id
- *
- * @param questionId 题目id
- */
- public Builder questionId(Integer questionId) {
- obj.setQuestionId(questionId);
- return this;
- }
- /**
- * 设置题目编号id
- *
- * @param questionNoId 题目编号id
- */
- public Builder questionNoId(Integer questionNoId) {
- obj.setQuestionNoId(questionNoId);
- return this;
- }
- /**
- * 设置系统定义时间
- *
- * @param time 系统定义时间
- */
- public Builder time(Integer time) {
- obj.setTime(time);
- return this;
- }
- /**
- * 设置用户用时
- *
- * @param userTime 用户用时
- */
- public Builder userTime(Integer userTime) {
- obj.setUserTime(userTime);
- return this;
- }
- /**
- * @param createTime
- */
- public Builder createTime(Date createTime) {
- obj.setCreateTime(createTime);
- return this;
- }
- /**
- * 设置系统答案:json
- *
- * @param answer 系统答案:json
- */
- public Builder answer(JSONObject answer) {
- obj.setAnswer(answer);
- return this;
- }
- /**
- * 设置用户答案:json
- *
- * @param userAnswer 用户答案:json
- */
- public Builder userAnswer(JSONObject userAnswer) {
- obj.setUserAnswer(userAnswer);
- return this;
- }
- /**
- * 设置正确:0错误,1正确
- *
- * @param isCorrect 正确:0错误,1正确
- */
- public Builder isCorrect(Integer isCorrect) {
- obj.setIsCorrect(isCorrect);
- return this;
- }
- public UserQuestion build() {
- return this.obj;
- }
- }
- }
|