ExaminationStruct.java 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378
  1. package com.qxgmat.data.dao.entity;
  2. import java.io.Serializable;
  3. import javax.persistence.*;
  4. @Table(name = "examination_struct")
  5. public class ExaminationStruct implements Serializable {
  6. @Id
  7. @Column(name = "`id`")
  8. @GeneratedValue(strategy = GenerationType.IDENTITY)
  9. private Integer id;
  10. /**
  11. * 中文名称
  12. */
  13. @Column(name = "`title_zh`")
  14. private String titleZh;
  15. /**
  16. * 英文名称
  17. */
  18. @Column(name = "`title_en`")
  19. private String titleEn;
  20. /**
  21. * 父级id
  22. */
  23. @Column(name = "`parent_id`")
  24. private Integer parentId;
  25. /**
  26. * 排序:从大到小
  27. */
  28. @Column(name = "`sort`")
  29. private Integer sort;
  30. /**
  31. * 层级:从1开始
  32. */
  33. @Column(name = "`level`")
  34. private Integer level;
  35. /**
  36. * 难度适应性:0非难度适应性,1难度适应性
  37. */
  38. @Column(name = "`is_adapt`")
  39. private Integer isAdapt;
  40. /**
  41. * 提问状态
  42. */
  43. @Column(name = "`question_status`")
  44. private Integer questionStatus;
  45. /**
  46. * 对应服务
  47. */
  48. @Column(name = "`extend`")
  49. private String extend;
  50. /**
  51. * 说明
  52. */
  53. @Column(name = "`description`")
  54. private String description;
  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 title_zh - 中文名称
  72. */
  73. public String getTitleZh() {
  74. return titleZh;
  75. }
  76. /**
  77. * 设置中文名称
  78. *
  79. * @param titleZh 中文名称
  80. */
  81. public void setTitleZh(String titleZh) {
  82. this.titleZh = titleZh;
  83. }
  84. /**
  85. * 获取英文名称
  86. *
  87. * @return title_en - 英文名称
  88. */
  89. public String getTitleEn() {
  90. return titleEn;
  91. }
  92. /**
  93. * 设置英文名称
  94. *
  95. * @param titleEn 英文名称
  96. */
  97. public void setTitleEn(String titleEn) {
  98. this.titleEn = titleEn;
  99. }
  100. /**
  101. * 获取父级id
  102. *
  103. * @return parent_id - 父级id
  104. */
  105. public Integer getParentId() {
  106. return parentId;
  107. }
  108. /**
  109. * 设置父级id
  110. *
  111. * @param parentId 父级id
  112. */
  113. public void setParentId(Integer parentId) {
  114. this.parentId = parentId;
  115. }
  116. /**
  117. * 获取排序:从大到小
  118. *
  119. * @return sort - 排序:从大到小
  120. */
  121. public Integer getSort() {
  122. return sort;
  123. }
  124. /**
  125. * 设置排序:从大到小
  126. *
  127. * @param sort 排序:从大到小
  128. */
  129. public void setSort(Integer sort) {
  130. this.sort = sort;
  131. }
  132. /**
  133. * 获取层级:从1开始
  134. *
  135. * @return level - 层级:从1开始
  136. */
  137. public Integer getLevel() {
  138. return level;
  139. }
  140. /**
  141. * 设置层级:从1开始
  142. *
  143. * @param level 层级:从1开始
  144. */
  145. public void setLevel(Integer level) {
  146. this.level = level;
  147. }
  148. /**
  149. * 获取难度适应性:0非难度适应性,1难度适应性
  150. *
  151. * @return is_adapt - 难度适应性:0非难度适应性,1难度适应性
  152. */
  153. public Integer getIsAdapt() {
  154. return isAdapt;
  155. }
  156. /**
  157. * 设置难度适应性:0非难度适应性,1难度适应性
  158. *
  159. * @param isAdapt 难度适应性:0非难度适应性,1难度适应性
  160. */
  161. public void setIsAdapt(Integer isAdapt) {
  162. this.isAdapt = isAdapt;
  163. }
  164. /**
  165. * 获取提问状态
  166. *
  167. * @return question_status - 提问状态
  168. */
  169. public Integer getQuestionStatus() {
  170. return questionStatus;
  171. }
  172. /**
  173. * 设置提问状态
  174. *
  175. * @param questionStatus 提问状态
  176. */
  177. public void setQuestionStatus(Integer questionStatus) {
  178. this.questionStatus = questionStatus;
  179. }
  180. /**
  181. * 获取对应服务
  182. *
  183. * @return extend - 对应服务
  184. */
  185. public String getExtend() {
  186. return extend;
  187. }
  188. /**
  189. * 设置对应服务
  190. *
  191. * @param extend 对应服务
  192. */
  193. public void setExtend(String extend) {
  194. this.extend = extend;
  195. }
  196. /**
  197. * 获取说明
  198. *
  199. * @return description - 说明
  200. */
  201. public String getDescription() {
  202. return description;
  203. }
  204. /**
  205. * 设置说明
  206. *
  207. * @param description 说明
  208. */
  209. public void setDescription(String description) {
  210. this.description = description;
  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(", titleZh=").append(titleZh);
  220. sb.append(", titleEn=").append(titleEn);
  221. sb.append(", parentId=").append(parentId);
  222. sb.append(", sort=").append(sort);
  223. sb.append(", level=").append(level);
  224. sb.append(", isAdapt=").append(isAdapt);
  225. sb.append(", questionStatus=").append(questionStatus);
  226. sb.append(", extend=").append(extend);
  227. sb.append(", description=").append(description);
  228. sb.append("]");
  229. return sb.toString();
  230. }
  231. public static ExaminationStruct.Builder builder() {
  232. return new ExaminationStruct.Builder();
  233. }
  234. public static class Builder {
  235. private ExaminationStruct obj;
  236. public Builder() {
  237. this.obj = new ExaminationStruct();
  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 titleZh 中文名称
  250. */
  251. public Builder titleZh(String titleZh) {
  252. obj.setTitleZh(titleZh);
  253. return this;
  254. }
  255. /**
  256. * 设置英文名称
  257. *
  258. * @param titleEn 英文名称
  259. */
  260. public Builder titleEn(String titleEn) {
  261. obj.setTitleEn(titleEn);
  262. return this;
  263. }
  264. /**
  265. * 设置父级id
  266. *
  267. * @param parentId 父级id
  268. */
  269. public Builder parentId(Integer parentId) {
  270. obj.setParentId(parentId);
  271. return this;
  272. }
  273. /**
  274. * 设置排序:从大到小
  275. *
  276. * @param sort 排序:从大到小
  277. */
  278. public Builder sort(Integer sort) {
  279. obj.setSort(sort);
  280. return this;
  281. }
  282. /**
  283. * 设置层级:从1开始
  284. *
  285. * @param level 层级:从1开始
  286. */
  287. public Builder level(Integer level) {
  288. obj.setLevel(level);
  289. return this;
  290. }
  291. /**
  292. * 设置难度适应性:0非难度适应性,1难度适应性
  293. *
  294. * @param isAdapt 难度适应性:0非难度适应性,1难度适应性
  295. */
  296. public Builder isAdapt(Integer isAdapt) {
  297. obj.setIsAdapt(isAdapt);
  298. return this;
  299. }
  300. /**
  301. * 设置提问状态
  302. *
  303. * @param questionStatus 提问状态
  304. */
  305. public Builder questionStatus(Integer questionStatus) {
  306. obj.setQuestionStatus(questionStatus);
  307. return this;
  308. }
  309. /**
  310. * 设置对应服务
  311. *
  312. * @param extend 对应服务
  313. */
  314. public Builder extend(String extend) {
  315. obj.setExtend(extend);
  316. return this;
  317. }
  318. /**
  319. * 设置说明
  320. *
  321. * @param description 说明
  322. */
  323. public Builder description(String description) {
  324. obj.setDescription(description);
  325. return this;
  326. }
  327. public ExaminationStruct build() {
  328. return this.obj;
  329. }
  330. }
  331. }