ExerciseStruct.java 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474
  1. package com.qxgmat.data.dao.entity;
  2. import java.io.Serializable;
  3. import javax.persistence.*;
  4. @Table(name = "exercise_struct")
  5. public class ExerciseStruct 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 = "`question_status`")
  39. private Integer questionStatus;
  40. /**
  41. * 是否是课程
  42. */
  43. @Column(name = "`is_course`")
  44. private Integer isCourse;
  45. /**
  46. * 是否是资料
  47. */
  48. @Column(name = "`is_data`")
  49. private Integer isData;
  50. /**
  51. * 是否是长难句:每一层都继承
  52. */
  53. @Column(name = "`is_sentence`")
  54. private Integer isSentence;
  55. /**
  56. * 是否是考试:每一层都继承
  57. */
  58. @Column(name = "`is_examination`")
  59. private Integer isExamination;
  60. @Column(name = "`extend`")
  61. private String extend;
  62. /**
  63. * 描述
  64. */
  65. @Column(name = "`description`")
  66. private String description;
  67. private static final long serialVersionUID = 1L;
  68. /**
  69. * @return id
  70. */
  71. public Integer getId() {
  72. return id;
  73. }
  74. /**
  75. * @param id
  76. */
  77. public void setId(Integer id) {
  78. this.id = id;
  79. }
  80. /**
  81. * 获取中文名称
  82. *
  83. * @return title_zh - 中文名称
  84. */
  85. public String getTitleZh() {
  86. return titleZh;
  87. }
  88. /**
  89. * 设置中文名称
  90. *
  91. * @param titleZh 中文名称
  92. */
  93. public void setTitleZh(String titleZh) {
  94. this.titleZh = titleZh;
  95. }
  96. /**
  97. * 获取英文名称
  98. *
  99. * @return title_en - 英文名称
  100. */
  101. public String getTitleEn() {
  102. return titleEn;
  103. }
  104. /**
  105. * 设置英文名称
  106. *
  107. * @param titleEn 英文名称
  108. */
  109. public void setTitleEn(String titleEn) {
  110. this.titleEn = titleEn;
  111. }
  112. /**
  113. * 获取父级id
  114. *
  115. * @return parent_id - 父级id
  116. */
  117. public Integer getParentId() {
  118. return parentId;
  119. }
  120. /**
  121. * 设置父级id
  122. *
  123. * @param parentId 父级id
  124. */
  125. public void setParentId(Integer parentId) {
  126. this.parentId = parentId;
  127. }
  128. /**
  129. * 获取排序:从大到小
  130. *
  131. * @return sort - 排序:从大到小
  132. */
  133. public Integer getSort() {
  134. return sort;
  135. }
  136. /**
  137. * 设置排序:从大到小
  138. *
  139. * @param sort 排序:从大到小
  140. */
  141. public void setSort(Integer sort) {
  142. this.sort = sort;
  143. }
  144. /**
  145. * 获取层级:从1开始
  146. *
  147. * @return level - 层级:从1开始
  148. */
  149. public Integer getLevel() {
  150. return level;
  151. }
  152. /**
  153. * 设置层级:从1开始
  154. *
  155. * @param level 层级:从1开始
  156. */
  157. public void setLevel(Integer level) {
  158. this.level = level;
  159. }
  160. /**
  161. * 获取提问状态:0关闭,1开启
  162. *
  163. * @return question_status - 提问状态:0关闭,1开启
  164. */
  165. public Integer getQuestionStatus() {
  166. return questionStatus;
  167. }
  168. /**
  169. * 设置提问状态:0关闭,1开启
  170. *
  171. * @param questionStatus 提问状态:0关闭,1开启
  172. */
  173. public void setQuestionStatus(Integer questionStatus) {
  174. this.questionStatus = questionStatus;
  175. }
  176. /**
  177. * 获取是否是课程
  178. *
  179. * @return is_course - 是否是课程
  180. */
  181. public Integer getIsCourse() {
  182. return isCourse;
  183. }
  184. /**
  185. * 设置是否是课程
  186. *
  187. * @param isCourse 是否是课程
  188. */
  189. public void setIsCourse(Integer isCourse) {
  190. this.isCourse = isCourse;
  191. }
  192. /**
  193. * 获取是否是资料
  194. *
  195. * @return is_data - 是否是资料
  196. */
  197. public Integer getIsData() {
  198. return isData;
  199. }
  200. /**
  201. * 设置是否是资料
  202. *
  203. * @param isData 是否是资料
  204. */
  205. public void setIsData(Integer isData) {
  206. this.isData = isData;
  207. }
  208. /**
  209. * 获取是否是长难句:每一层都继承
  210. *
  211. * @return is_sentence - 是否是长难句:每一层都继承
  212. */
  213. public Integer getIsSentence() {
  214. return isSentence;
  215. }
  216. /**
  217. * 设置是否是长难句:每一层都继承
  218. *
  219. * @param isSentence 是否是长难句:每一层都继承
  220. */
  221. public void setIsSentence(Integer isSentence) {
  222. this.isSentence = isSentence;
  223. }
  224. /**
  225. * 获取是否是考试:每一层都继承
  226. *
  227. * @return is_examination - 是否是考试:每一层都继承
  228. */
  229. public Integer getIsExamination() {
  230. return isExamination;
  231. }
  232. /**
  233. * 设置是否是考试:每一层都继承
  234. *
  235. * @param isExamination 是否是考试:每一层都继承
  236. */
  237. public void setIsExamination(Integer isExamination) {
  238. this.isExamination = isExamination;
  239. }
  240. /**
  241. * @return extend
  242. */
  243. public String getExtend() {
  244. return extend;
  245. }
  246. /**
  247. * @param extend
  248. */
  249. public void setExtend(String extend) {
  250. this.extend = extend;
  251. }
  252. /**
  253. * 获取描述
  254. *
  255. * @return description - 描述
  256. */
  257. public String getDescription() {
  258. return description;
  259. }
  260. /**
  261. * 设置描述
  262. *
  263. * @param description 描述
  264. */
  265. public void setDescription(String description) {
  266. this.description = description;
  267. }
  268. @Override
  269. public String toString() {
  270. StringBuilder sb = new StringBuilder();
  271. sb.append(getClass().getSimpleName());
  272. sb.append(" [");
  273. sb.append("Hash = ").append(hashCode());
  274. sb.append(", id=").append(id);
  275. sb.append(", titleZh=").append(titleZh);
  276. sb.append(", titleEn=").append(titleEn);
  277. sb.append(", parentId=").append(parentId);
  278. sb.append(", sort=").append(sort);
  279. sb.append(", level=").append(level);
  280. sb.append(", questionStatus=").append(questionStatus);
  281. sb.append(", isCourse=").append(isCourse);
  282. sb.append(", isData=").append(isData);
  283. sb.append(", isSentence=").append(isSentence);
  284. sb.append(", isExamination=").append(isExamination);
  285. sb.append(", extend=").append(extend);
  286. sb.append(", description=").append(description);
  287. sb.append("]");
  288. return sb.toString();
  289. }
  290. public static ExerciseStruct.Builder builder() {
  291. return new ExerciseStruct.Builder();
  292. }
  293. public static class Builder {
  294. private ExerciseStruct obj;
  295. public Builder() {
  296. this.obj = new ExerciseStruct();
  297. }
  298. /**
  299. * @param id
  300. */
  301. public Builder id(Integer id) {
  302. obj.setId(id);
  303. return this;
  304. }
  305. /**
  306. * 设置中文名称
  307. *
  308. * @param titleZh 中文名称
  309. */
  310. public Builder titleZh(String titleZh) {
  311. obj.setTitleZh(titleZh);
  312. return this;
  313. }
  314. /**
  315. * 设置英文名称
  316. *
  317. * @param titleEn 英文名称
  318. */
  319. public Builder titleEn(String titleEn) {
  320. obj.setTitleEn(titleEn);
  321. return this;
  322. }
  323. /**
  324. * 设置父级id
  325. *
  326. * @param parentId 父级id
  327. */
  328. public Builder parentId(Integer parentId) {
  329. obj.setParentId(parentId);
  330. return this;
  331. }
  332. /**
  333. * 设置排序:从大到小
  334. *
  335. * @param sort 排序:从大到小
  336. */
  337. public Builder sort(Integer sort) {
  338. obj.setSort(sort);
  339. return this;
  340. }
  341. /**
  342. * 设置层级:从1开始
  343. *
  344. * @param level 层级:从1开始
  345. */
  346. public Builder level(Integer level) {
  347. obj.setLevel(level);
  348. return this;
  349. }
  350. /**
  351. * 设置提问状态:0关闭,1开启
  352. *
  353. * @param questionStatus 提问状态:0关闭,1开启
  354. */
  355. public Builder questionStatus(Integer questionStatus) {
  356. obj.setQuestionStatus(questionStatus);
  357. return this;
  358. }
  359. /**
  360. * 设置是否是课程
  361. *
  362. * @param isCourse 是否是课程
  363. */
  364. public Builder isCourse(Integer isCourse) {
  365. obj.setIsCourse(isCourse);
  366. return this;
  367. }
  368. /**
  369. * 设置是否是资料
  370. *
  371. * @param isData 是否是资料
  372. */
  373. public Builder isData(Integer isData) {
  374. obj.setIsData(isData);
  375. return this;
  376. }
  377. /**
  378. * 设置是否是长难句:每一层都继承
  379. *
  380. * @param isSentence 是否是长难句:每一层都继承
  381. */
  382. public Builder isSentence(Integer isSentence) {
  383. obj.setIsSentence(isSentence);
  384. return this;
  385. }
  386. /**
  387. * 设置是否是考试:每一层都继承
  388. *
  389. * @param isExamination 是否是考试:每一层都继承
  390. */
  391. public Builder isExamination(Integer isExamination) {
  392. obj.setIsExamination(isExamination);
  393. return this;
  394. }
  395. /**
  396. * @param extend
  397. */
  398. public Builder extend(String extend) {
  399. obj.setExtend(extend);
  400. return this;
  401. }
  402. /**
  403. * 设置描述
  404. *
  405. * @param description 描述
  406. */
  407. public Builder description(String description) {
  408. obj.setDescription(description);
  409. return this;
  410. }
  411. public ExerciseStruct build() {
  412. return this.obj;
  413. }
  414. }
  415. }