ExercisePaper.java 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378
  1. package com.qxgmat.data.dao.entity;
  2. import java.io.Serializable;
  3. import javax.persistence.*;
  4. @Table(name = "exercise_paper")
  5. public class ExercisePaper implements Serializable {
  6. @Id
  7. @Column(name = "`id`")
  8. @GeneratedValue(strategy = GenerationType.IDENTITY)
  9. private Integer id;
  10. /**
  11. * 题型
  12. */
  13. @Column(name = "`type`")
  14. private String type;
  15. /**
  16. * 组卷逻辑:order ,place,difficult,error
  17. */
  18. @Column(name = "`logic`")
  19. private String logic;
  20. /**
  21. * 逻辑
  22. */
  23. @Column(name = "`logic_extend`")
  24. private String logicExtend;
  25. /**
  26. * 分册
  27. */
  28. @Column(name = "`struct_id`")
  29. private Integer structId;
  30. /**
  31. * 所有父级id,逗号分隔
  32. */
  33. @Column(name = "`struct_parent`")
  34. private Integer[] structParent;
  35. /**
  36. * 组卷名称
  37. */
  38. @Column(name = "`title`")
  39. private String title;
  40. /**
  41. * 题目数量
  42. */
  43. @Column(name = "`question_number`")
  44. private Integer questionNumber;
  45. /**
  46. * 开放状态:0关闭,1开启
  47. */
  48. @Column(name = "`status`")
  49. private Integer status;
  50. /**
  51. * 题目编号ids:json
  52. */
  53. @Column(name = "`question_no_ids`")
  54. private String questionNoIds;
  55. private static final long serialVersionUID = 1L;
  56. /**
  57. * @return id
  58. */
  59. public Integer getId() {
  60. return id;
  61. }
  62. /**
  63. * @param id
  64. */
  65. public void setId(Integer id) {
  66. this.id = id;
  67. }
  68. /**
  69. * 获取题型
  70. *
  71. * @return type - 题型
  72. */
  73. public String getType() {
  74. return type;
  75. }
  76. /**
  77. * 设置题型
  78. *
  79. * @param type 题型
  80. */
  81. public void setType(String type) {
  82. this.type = type;
  83. }
  84. /**
  85. * 获取组卷逻辑:order ,place,difficult,error
  86. *
  87. * @return logic - 组卷逻辑:order ,place,difficult,error
  88. */
  89. public String getLogic() {
  90. return logic;
  91. }
  92. /**
  93. * 设置组卷逻辑:order ,place,difficult,error
  94. *
  95. * @param logic 组卷逻辑:order ,place,difficult,error
  96. */
  97. public void setLogic(String logic) {
  98. this.logic = logic;
  99. }
  100. /**
  101. * 获取逻辑
  102. *
  103. * @return logic_extend - 逻辑
  104. */
  105. public String getLogicExtend() {
  106. return logicExtend;
  107. }
  108. /**
  109. * 设置逻辑
  110. *
  111. * @param logicExtend 逻辑
  112. */
  113. public void setLogicExtend(String logicExtend) {
  114. this.logicExtend = logicExtend;
  115. }
  116. /**
  117. * 获取分册
  118. *
  119. * @return struct_id - 分册
  120. */
  121. public Integer getStructId() {
  122. return structId;
  123. }
  124. /**
  125. * 设置分册
  126. *
  127. * @param structId 分册
  128. */
  129. public void setStructId(Integer structId) {
  130. this.structId = structId;
  131. }
  132. /**
  133. * 获取所有父级id,逗号分隔
  134. *
  135. * @return struct_parent - 所有父级id,逗号分隔
  136. */
  137. public Integer[] getStructParent() {
  138. return structParent;
  139. }
  140. /**
  141. * 设置所有父级id,逗号分隔
  142. *
  143. * @param structParent 所有父级id,逗号分隔
  144. */
  145. public void setStructParent(Integer[] structParent) {
  146. this.structParent = structParent;
  147. }
  148. /**
  149. * 获取组卷名称
  150. *
  151. * @return title - 组卷名称
  152. */
  153. public String getTitle() {
  154. return title;
  155. }
  156. /**
  157. * 设置组卷名称
  158. *
  159. * @param title 组卷名称
  160. */
  161. public void setTitle(String title) {
  162. this.title = title;
  163. }
  164. /**
  165. * 获取题目数量
  166. *
  167. * @return question_number - 题目数量
  168. */
  169. public Integer getQuestionNumber() {
  170. return questionNumber;
  171. }
  172. /**
  173. * 设置题目数量
  174. *
  175. * @param questionNumber 题目数量
  176. */
  177. public void setQuestionNumber(Integer questionNumber) {
  178. this.questionNumber = questionNumber;
  179. }
  180. /**
  181. * 获取开放状态:0关闭,1开启
  182. *
  183. * @return status - 开放状态:0关闭,1开启
  184. */
  185. public Integer getStatus() {
  186. return status;
  187. }
  188. /**
  189. * 设置开放状态:0关闭,1开启
  190. *
  191. * @param status 开放状态:0关闭,1开启
  192. */
  193. public void setStatus(Integer status) {
  194. this.status = status;
  195. }
  196. /**
  197. * 获取题目编号ids:json
  198. *
  199. * @return question_no_ids - 题目编号ids:json
  200. */
  201. public String getQuestionNoIds() {
  202. return questionNoIds;
  203. }
  204. /**
  205. * 设置题目编号ids:json
  206. *
  207. * @param questionNoIds 题目编号ids:json
  208. */
  209. public void setQuestionNoIds(String questionNoIds) {
  210. this.questionNoIds = questionNoIds;
  211. }
  212. @Override
  213. public String toString() {
  214. StringBuilder sb = new StringBuilder();
  215. sb.append(getClass().getSimpleName());
  216. sb.append(" [");
  217. sb.append("Hash = ").append(hashCode());
  218. sb.append(", id=").append(id);
  219. sb.append(", type=").append(type);
  220. sb.append(", logic=").append(logic);
  221. sb.append(", logicExtend=").append(logicExtend);
  222. sb.append(", structId=").append(structId);
  223. sb.append(", structParent=").append(structParent);
  224. sb.append(", title=").append(title);
  225. sb.append(", questionNumber=").append(questionNumber);
  226. sb.append(", status=").append(status);
  227. sb.append(", questionNoIds=").append(questionNoIds);
  228. sb.append("]");
  229. return sb.toString();
  230. }
  231. public static ExercisePaper.Builder builder() {
  232. return new ExercisePaper.Builder();
  233. }
  234. public static class Builder {
  235. private ExercisePaper obj;
  236. public Builder() {
  237. this.obj = new ExercisePaper();
  238. }
  239. /**
  240. * @param id
  241. */
  242. public Builder id(Integer id) {
  243. obj.setId(id);
  244. return this;
  245. }
  246. /**
  247. * 设置题型
  248. *
  249. * @param type 题型
  250. */
  251. public Builder type(String type) {
  252. obj.setType(type);
  253. return this;
  254. }
  255. /**
  256. * 设置组卷逻辑:order ,place,difficult,error
  257. *
  258. * @param logic 组卷逻辑:order ,place,difficult,error
  259. */
  260. public Builder logic(String logic) {
  261. obj.setLogic(logic);
  262. return this;
  263. }
  264. /**
  265. * 设置逻辑
  266. *
  267. * @param logicExtend 逻辑
  268. */
  269. public Builder logicExtend(String logicExtend) {
  270. obj.setLogicExtend(logicExtend);
  271. return this;
  272. }
  273. /**
  274. * 设置分册
  275. *
  276. * @param structId 分册
  277. */
  278. public Builder structId(Integer structId) {
  279. obj.setStructId(structId);
  280. return this;
  281. }
  282. /**
  283. * 设置所有父级id,逗号分隔
  284. *
  285. * @param structParent 所有父级id,逗号分隔
  286. */
  287. public Builder structParent(Integer[] structParent) {
  288. obj.setStructParent(structParent);
  289. return this;
  290. }
  291. /**
  292. * 设置组卷名称
  293. *
  294. * @param title 组卷名称
  295. */
  296. public Builder title(String title) {
  297. obj.setTitle(title);
  298. return this;
  299. }
  300. /**
  301. * 设置题目数量
  302. *
  303. * @param questionNumber 题目数量
  304. */
  305. public Builder questionNumber(Integer questionNumber) {
  306. obj.setQuestionNumber(questionNumber);
  307. return this;
  308. }
  309. /**
  310. * 设置开放状态:0关闭,1开启
  311. *
  312. * @param status 开放状态:0关闭,1开启
  313. */
  314. public Builder status(Integer status) {
  315. obj.setStatus(status);
  316. return this;
  317. }
  318. /**
  319. * 设置题目编号ids:json
  320. *
  321. * @param questionNoIds 题目编号ids:json
  322. */
  323. public Builder questionNoIds(String questionNoIds) {
  324. obj.setQuestionNoIds(questionNoIds);
  325. return this;
  326. }
  327. public ExercisePaper build() {
  328. return this.obj;
  329. }
  330. }
  331. }