ExaminationPaper.java 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. package com.qxgmat.data.dao.entity;
  2. import java.io.Serializable;
  3. import javax.persistence.*;
  4. @Table(name = "examination_paper")
  5. public class ExaminationPaper implements Serializable {
  6. @Id
  7. @Column(name = "`id`")
  8. @GeneratedValue(strategy = GenerationType.IDENTITY)
  9. private Integer id;
  10. @Column(name = "`struct_id`")
  11. private Integer structId;
  12. /**
  13. * 标题
  14. */
  15. @Column(name = "`title`")
  16. private String title;
  17. /**
  18. * 题目数量
  19. */
  20. @Column(name = "`question_number`")
  21. private Integer questionNumber;
  22. /**
  23. * 开放状态:0关闭,1开启
  24. */
  25. @Column(name = "`status`")
  26. private Integer status;
  27. /**
  28. * 题目编号ids:json
  29. */
  30. @Column(name = "`question_no_ids`")
  31. private String questionNoIds;
  32. private static final long serialVersionUID = 1L;
  33. /**
  34. * @return id
  35. */
  36. public Integer getId() {
  37. return id;
  38. }
  39. /**
  40. * @param id
  41. */
  42. public void setId(Integer id) {
  43. this.id = id;
  44. }
  45. /**
  46. * @return struct_id
  47. */
  48. public Integer getStructId() {
  49. return structId;
  50. }
  51. /**
  52. * @param structId
  53. */
  54. public void setStructId(Integer structId) {
  55. this.structId = structId;
  56. }
  57. /**
  58. * 获取标题
  59. *
  60. * @return title - 标题
  61. */
  62. public String getTitle() {
  63. return title;
  64. }
  65. /**
  66. * 设置标题
  67. *
  68. * @param title 标题
  69. */
  70. public void setTitle(String title) {
  71. this.title = title;
  72. }
  73. /**
  74. * 获取题目数量
  75. *
  76. * @return question_number - 题目数量
  77. */
  78. public Integer getQuestionNumber() {
  79. return questionNumber;
  80. }
  81. /**
  82. * 设置题目数量
  83. *
  84. * @param questionNumber 题目数量
  85. */
  86. public void setQuestionNumber(Integer questionNumber) {
  87. this.questionNumber = questionNumber;
  88. }
  89. /**
  90. * 获取开放状态:0关闭,1开启
  91. *
  92. * @return status - 开放状态:0关闭,1开启
  93. */
  94. public Integer getStatus() {
  95. return status;
  96. }
  97. /**
  98. * 设置开放状态:0关闭,1开启
  99. *
  100. * @param status 开放状态:0关闭,1开启
  101. */
  102. public void setStatus(Integer status) {
  103. this.status = status;
  104. }
  105. /**
  106. * 获取题目编号ids:json
  107. *
  108. * @return question_no_ids - 题目编号ids:json
  109. */
  110. public String getQuestionNoIds() {
  111. return questionNoIds;
  112. }
  113. /**
  114. * 设置题目编号ids:json
  115. *
  116. * @param questionNoIds 题目编号ids:json
  117. */
  118. public void setQuestionNoIds(String questionNoIds) {
  119. this.questionNoIds = questionNoIds;
  120. }
  121. @Override
  122. public String toString() {
  123. StringBuilder sb = new StringBuilder();
  124. sb.append(getClass().getSimpleName());
  125. sb.append(" [");
  126. sb.append("Hash = ").append(hashCode());
  127. sb.append(", id=").append(id);
  128. sb.append(", structId=").append(structId);
  129. sb.append(", title=").append(title);
  130. sb.append(", questionNumber=").append(questionNumber);
  131. sb.append(", status=").append(status);
  132. sb.append(", questionNoIds=").append(questionNoIds);
  133. sb.append("]");
  134. return sb.toString();
  135. }
  136. public static ExaminationPaper.Builder builder() {
  137. return new ExaminationPaper.Builder();
  138. }
  139. public static class Builder {
  140. private ExaminationPaper obj;
  141. public Builder() {
  142. this.obj = new ExaminationPaper();
  143. }
  144. /**
  145. * @param id
  146. */
  147. public Builder id(Integer id) {
  148. obj.setId(id);
  149. return this;
  150. }
  151. /**
  152. * @param structId
  153. */
  154. public Builder structId(Integer structId) {
  155. obj.setStructId(structId);
  156. return this;
  157. }
  158. /**
  159. * 设置标题
  160. *
  161. * @param title 标题
  162. */
  163. public Builder title(String title) {
  164. obj.setTitle(title);
  165. return this;
  166. }
  167. /**
  168. * 设置题目数量
  169. *
  170. * @param questionNumber 题目数量
  171. */
  172. public Builder questionNumber(Integer questionNumber) {
  173. obj.setQuestionNumber(questionNumber);
  174. return this;
  175. }
  176. /**
  177. * 设置开放状态:0关闭,1开启
  178. *
  179. * @param status 开放状态:0关闭,1开启
  180. */
  181. public Builder status(Integer status) {
  182. obj.setStatus(status);
  183. return this;
  184. }
  185. /**
  186. * 设置题目编号ids:json
  187. *
  188. * @param questionNoIds 题目编号ids:json
  189. */
  190. public Builder questionNoIds(String questionNoIds) {
  191. obj.setQuestionNoIds(questionNoIds);
  192. return this;
  193. }
  194. public ExaminationPaper build() {
  195. return this.obj;
  196. }
  197. }
  198. }