Question.java 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841
  1. package com.qxgmat.data.dao.entity;
  2. import com.alibaba.fastjson.JSONObject;
  3. import java.io.Serializable;
  4. import java.util.Date;
  5. import javax.persistence.*;
  6. @Table(name = "question")
  7. public class Question implements Serializable {
  8. @Id
  9. @Column(name = "`id`")
  10. @GeneratedValue(strategy = GenerationType.IDENTITY)
  11. private Integer id;
  12. /**
  13. * 关键词,逗号分隔
  14. */
  15. @Column(name = "`keyword`")
  16. private String[] keyword;
  17. @Column(name = "`question_module`")
  18. private String questionModule;
  19. /**
  20. * 题型
  21. */
  22. @Column(name = "`question_type`")
  23. private String questionType;
  24. @Column(name = "`place`")
  25. private String place;
  26. /**
  27. * 难度
  28. */
  29. @Column(name = "`difficult`")
  30. private String difficult;
  31. /**
  32. * 难度分
  33. */
  34. @Column(name = "`difficult_score`")
  35. private Float difficultScore;
  36. /**
  37. * 简介:自动从题干提取
  38. */
  39. @Column(name = "`description`")
  40. private String description;
  41. /**
  42. * 内容:json
  43. */
  44. @Column(name = "`content`")
  45. private JSONObject content;
  46. /**
  47. * 答案:json
  48. */
  49. @Column(name = "`answer`")
  50. private JSONObject answer;
  51. @Column(name = "`question_time`")
  52. private Date questionTime;
  53. @Column(name = "`qx_time`")
  54. private Date qxTime;
  55. @Column(name = "`official_time`")
  56. private Date officialTime;
  57. @Column(name = "`association_time`")
  58. private Date associationTime;
  59. /**
  60. * 题源联想:json
  61. */
  62. @Column(name = "`association_content`")
  63. private Integer[] associationContent;
  64. /**
  65. * 总作答时间
  66. */
  67. @Column(name = "`total_time`")
  68. private Integer totalTime;
  69. /**
  70. * 总作答次数
  71. */
  72. @Column(name = "`total_number`")
  73. private Integer totalNumber;
  74. /**
  75. * 总正确次数
  76. */
  77. @Column(name = "`total_correct`")
  78. private Integer totalCorrect;
  79. /**
  80. * 收藏数
  81. */
  82. @Column(name = "`collect_number`")
  83. private Integer collectNumber;
  84. @Column(name = "`create_time`")
  85. private Date createTime;
  86. @Column(name = "`update_time`")
  87. private Date updateTime;
  88. /**
  89. * 答案分布
  90. */
  91. @Column(name = "`answer_distributed`")
  92. private JSONObject answerDistributed;
  93. /**
  94. * 题干
  95. */
  96. @Column(name = "`stem`")
  97. private String stem;
  98. @Column(name = "`qx_content`")
  99. private String qxContent;
  100. @Column(name = "`official_content`")
  101. private String officialContent;
  102. @Column(name = "`chinese_content`")
  103. private String chineseContent;
  104. private static final long serialVersionUID = 1L;
  105. /**
  106. * @return id
  107. */
  108. public Integer getId() {
  109. return id;
  110. }
  111. /**
  112. * @param id
  113. */
  114. public void setId(Integer id) {
  115. this.id = id;
  116. }
  117. /**
  118. * 获取关键词,逗号分隔
  119. *
  120. * @return keyword - 关键词,逗号分隔
  121. */
  122. public String[] getKeyword() {
  123. return keyword;
  124. }
  125. /**
  126. * 设置关键词,逗号分隔
  127. *
  128. * @param keyword 关键词,逗号分隔
  129. */
  130. public void setKeyword(String[] keyword) {
  131. this.keyword = keyword;
  132. }
  133. /**
  134. * @return question_module
  135. */
  136. public String getQuestionModule() {
  137. return questionModule;
  138. }
  139. /**
  140. * @param questionModule
  141. */
  142. public void setQuestionModule(String questionModule) {
  143. this.questionModule = questionModule;
  144. }
  145. /**
  146. * 获取题型
  147. *
  148. * @return question_type - 题型
  149. */
  150. public String getQuestionType() {
  151. return questionType;
  152. }
  153. /**
  154. * 设置题型
  155. *
  156. * @param questionType 题型
  157. */
  158. public void setQuestionType(String questionType) {
  159. this.questionType = questionType;
  160. }
  161. /**
  162. * @return place
  163. */
  164. public String getPlace() {
  165. return place;
  166. }
  167. /**
  168. * @param place
  169. */
  170. public void setPlace(String place) {
  171. this.place = place;
  172. }
  173. /**
  174. * 获取难度
  175. *
  176. * @return difficult - 难度
  177. */
  178. public String getDifficult() {
  179. return difficult;
  180. }
  181. /**
  182. * 设置难度
  183. *
  184. * @param difficult 难度
  185. */
  186. public void setDifficult(String difficult) {
  187. this.difficult = difficult;
  188. }
  189. /**
  190. * 获取难度分
  191. *
  192. * @return difficult_score - 难度分
  193. */
  194. public Float getDifficultScore() {
  195. return difficultScore;
  196. }
  197. /**
  198. * 设置难度分
  199. *
  200. * @param difficultScore 难度分
  201. */
  202. public void setDifficultScore(Float difficultScore) {
  203. this.difficultScore = difficultScore;
  204. }
  205. /**
  206. * 获取简介:自动从题干提取
  207. *
  208. * @return description - 简介:自动从题干提取
  209. */
  210. public String getDescription() {
  211. return description;
  212. }
  213. /**
  214. * 设置简介:自动从题干提取
  215. *
  216. * @param description 简介:自动从题干提取
  217. */
  218. public void setDescription(String description) {
  219. this.description = description;
  220. }
  221. /**
  222. * 获取内容:json
  223. *
  224. * @return content - 内容:json
  225. */
  226. public JSONObject getContent() {
  227. return content;
  228. }
  229. /**
  230. * 设置内容:json
  231. *
  232. * @param content 内容:json
  233. */
  234. public void setContent(JSONObject content) {
  235. this.content = content;
  236. }
  237. /**
  238. * 获取答案:json
  239. *
  240. * @return answer - 答案:json
  241. */
  242. public JSONObject getAnswer() {
  243. return answer;
  244. }
  245. /**
  246. * 设置答案:json
  247. *
  248. * @param answer 答案:json
  249. */
  250. public void setAnswer(JSONObject answer) {
  251. this.answer = answer;
  252. }
  253. /**
  254. * @return question_time
  255. */
  256. public Date getQuestionTime() {
  257. return questionTime;
  258. }
  259. /**
  260. * @param questionTime
  261. */
  262. public void setQuestionTime(Date questionTime) {
  263. this.questionTime = questionTime;
  264. }
  265. /**
  266. * @return qx_time
  267. */
  268. public Date getQxTime() {
  269. return qxTime;
  270. }
  271. /**
  272. * @param qxTime
  273. */
  274. public void setQxTime(Date qxTime) {
  275. this.qxTime = qxTime;
  276. }
  277. /**
  278. * @return official_time
  279. */
  280. public Date getOfficialTime() {
  281. return officialTime;
  282. }
  283. /**
  284. * @param officialTime
  285. */
  286. public void setOfficialTime(Date officialTime) {
  287. this.officialTime = officialTime;
  288. }
  289. /**
  290. * @return association_time
  291. */
  292. public Date getAssociationTime() {
  293. return associationTime;
  294. }
  295. /**
  296. * @param associationTime
  297. */
  298. public void setAssociationTime(Date associationTime) {
  299. this.associationTime = associationTime;
  300. }
  301. /**
  302. * 获取题源联想:json
  303. *
  304. * @return association_content - 题源联想:json
  305. */
  306. public Integer[] getAssociationContent() {
  307. return associationContent;
  308. }
  309. /**
  310. * 设置题源联想:json
  311. *
  312. * @param associationContent 题源联想:json
  313. */
  314. public void setAssociationContent(Integer[] associationContent) {
  315. this.associationContent = associationContent;
  316. }
  317. /**
  318. * 获取总作答时间
  319. *
  320. * @return total_time - 总作答时间
  321. */
  322. public Integer getTotalTime() {
  323. return totalTime;
  324. }
  325. /**
  326. * 设置总作答时间
  327. *
  328. * @param totalTime 总作答时间
  329. */
  330. public void setTotalTime(Integer totalTime) {
  331. this.totalTime = totalTime;
  332. }
  333. /**
  334. * 获取总作答次数
  335. *
  336. * @return total_number - 总作答次数
  337. */
  338. public Integer getTotalNumber() {
  339. return totalNumber;
  340. }
  341. /**
  342. * 设置总作答次数
  343. *
  344. * @param totalNumber 总作答次数
  345. */
  346. public void setTotalNumber(Integer totalNumber) {
  347. this.totalNumber = totalNumber;
  348. }
  349. /**
  350. * 获取总正确次数
  351. *
  352. * @return total_correct - 总正确次数
  353. */
  354. public Integer getTotalCorrect() {
  355. return totalCorrect;
  356. }
  357. /**
  358. * 设置总正确次数
  359. *
  360. * @param totalCorrect 总正确次数
  361. */
  362. public void setTotalCorrect(Integer totalCorrect) {
  363. this.totalCorrect = totalCorrect;
  364. }
  365. /**
  366. * 获取收藏数
  367. *
  368. * @return collect_number - 收藏数
  369. */
  370. public Integer getCollectNumber() {
  371. return collectNumber;
  372. }
  373. /**
  374. * 设置收藏数
  375. *
  376. * @param collectNumber 收藏数
  377. */
  378. public void setCollectNumber(Integer collectNumber) {
  379. this.collectNumber = collectNumber;
  380. }
  381. /**
  382. * @return create_time
  383. */
  384. public Date getCreateTime() {
  385. return createTime;
  386. }
  387. /**
  388. * @param createTime
  389. */
  390. public void setCreateTime(Date createTime) {
  391. this.createTime = createTime;
  392. }
  393. /**
  394. * @return update_time
  395. */
  396. public Date getUpdateTime() {
  397. return updateTime;
  398. }
  399. /**
  400. * @param updateTime
  401. */
  402. public void setUpdateTime(Date updateTime) {
  403. this.updateTime = updateTime;
  404. }
  405. /**
  406. * 获取答案分布
  407. *
  408. * @return answer_distributed - 答案分布
  409. */
  410. public JSONObject getAnswerDistributed() {
  411. return answerDistributed;
  412. }
  413. /**
  414. * 设置答案分布
  415. *
  416. * @param answerDistributed 答案分布
  417. */
  418. public void setAnswerDistributed(JSONObject answerDistributed) {
  419. this.answerDistributed = answerDistributed;
  420. }
  421. /**
  422. * 获取题干
  423. *
  424. * @return stem - 题干
  425. */
  426. public String getStem() {
  427. return stem;
  428. }
  429. /**
  430. * 设置题干
  431. *
  432. * @param stem 题干
  433. */
  434. public void setStem(String stem) {
  435. this.stem = stem;
  436. }
  437. /**
  438. * @return qx_content
  439. */
  440. public String getQxContent() {
  441. return qxContent;
  442. }
  443. /**
  444. * @param qxContent
  445. */
  446. public void setQxContent(String qxContent) {
  447. this.qxContent = qxContent;
  448. }
  449. /**
  450. * @return official_content
  451. */
  452. public String getOfficialContent() {
  453. return officialContent;
  454. }
  455. /**
  456. * @param officialContent
  457. */
  458. public void setOfficialContent(String officialContent) {
  459. this.officialContent = officialContent;
  460. }
  461. /**
  462. * @return chinese_content
  463. */
  464. public String getChineseContent() {
  465. return chineseContent;
  466. }
  467. /**
  468. * @param chineseContent
  469. */
  470. public void setChineseContent(String chineseContent) {
  471. this.chineseContent = chineseContent;
  472. }
  473. @Override
  474. public String toString() {
  475. StringBuilder sb = new StringBuilder();
  476. sb.append(getClass().getSimpleName());
  477. sb.append(" [");
  478. sb.append("Hash = ").append(hashCode());
  479. sb.append(", id=").append(id);
  480. sb.append(", keyword=").append(keyword);
  481. sb.append(", questionModule=").append(questionModule);
  482. sb.append(", questionType=").append(questionType);
  483. sb.append(", place=").append(place);
  484. sb.append(", difficult=").append(difficult);
  485. sb.append(", difficultScore=").append(difficultScore);
  486. sb.append(", description=").append(description);
  487. sb.append(", content=").append(content);
  488. sb.append(", answer=").append(answer);
  489. sb.append(", questionTime=").append(questionTime);
  490. sb.append(", qxTime=").append(qxTime);
  491. sb.append(", officialTime=").append(officialTime);
  492. sb.append(", associationTime=").append(associationTime);
  493. sb.append(", associationContent=").append(associationContent);
  494. sb.append(", totalTime=").append(totalTime);
  495. sb.append(", totalNumber=").append(totalNumber);
  496. sb.append(", totalCorrect=").append(totalCorrect);
  497. sb.append(", collectNumber=").append(collectNumber);
  498. sb.append(", createTime=").append(createTime);
  499. sb.append(", updateTime=").append(updateTime);
  500. sb.append(", answerDistributed=").append(answerDistributed);
  501. sb.append(", stem=").append(stem);
  502. sb.append(", qxContent=").append(qxContent);
  503. sb.append(", officialContent=").append(officialContent);
  504. sb.append(", chineseContent=").append(chineseContent);
  505. sb.append("]");
  506. return sb.toString();
  507. }
  508. public static Question.Builder builder() {
  509. return new Question.Builder();
  510. }
  511. public static class Builder {
  512. private Question obj;
  513. public Builder() {
  514. this.obj = new Question();
  515. }
  516. /**
  517. * @param id
  518. */
  519. public Builder id(Integer id) {
  520. obj.setId(id);
  521. return this;
  522. }
  523. /**
  524. * 设置关键词,逗号分隔
  525. *
  526. * @param keyword 关键词,逗号分隔
  527. */
  528. public Builder keyword(String[] keyword) {
  529. obj.setKeyword(keyword);
  530. return this;
  531. }
  532. /**
  533. * @param questionModule
  534. */
  535. public Builder questionModule(String questionModule) {
  536. obj.setQuestionModule(questionModule);
  537. return this;
  538. }
  539. /**
  540. * 设置题型
  541. *
  542. * @param questionType 题型
  543. */
  544. public Builder questionType(String questionType) {
  545. obj.setQuestionType(questionType);
  546. return this;
  547. }
  548. /**
  549. * @param place
  550. */
  551. public Builder place(String place) {
  552. obj.setPlace(place);
  553. return this;
  554. }
  555. /**
  556. * 设置难度
  557. *
  558. * @param difficult 难度
  559. */
  560. public Builder difficult(String difficult) {
  561. obj.setDifficult(difficult);
  562. return this;
  563. }
  564. /**
  565. * 设置难度分
  566. *
  567. * @param difficultScore 难度分
  568. */
  569. public Builder difficultScore(Float difficultScore) {
  570. obj.setDifficultScore(difficultScore);
  571. return this;
  572. }
  573. /**
  574. * 设置简介:自动从题干提取
  575. *
  576. * @param description 简介:自动从题干提取
  577. */
  578. public Builder description(String description) {
  579. obj.setDescription(description);
  580. return this;
  581. }
  582. /**
  583. * 设置内容:json
  584. *
  585. * @param content 内容:json
  586. */
  587. public Builder content(JSONObject content) {
  588. obj.setContent(content);
  589. return this;
  590. }
  591. /**
  592. * 设置答案:json
  593. *
  594. * @param answer 答案:json
  595. */
  596. public Builder answer(JSONObject answer) {
  597. obj.setAnswer(answer);
  598. return this;
  599. }
  600. /**
  601. * 设置答案分布
  602. *
  603. * @param answerDistributed 答案分布
  604. */
  605. public Builder answerDistributed(JSONObject answerDistributed) {
  606. obj.setAnswerDistributed(answerDistributed);
  607. return this;
  608. }
  609. /**
  610. * @param questionTime
  611. */
  612. public Builder questionTime(Date questionTime) {
  613. obj.setQuestionTime(questionTime);
  614. return this;
  615. }
  616. /**
  617. * @param qxTime
  618. */
  619. public Builder qxTime(Date qxTime) {
  620. obj.setQxTime(qxTime);
  621. return this;
  622. }
  623. /**
  624. * @param officialTime
  625. */
  626. public Builder officialTime(Date officialTime) {
  627. obj.setOfficialTime(officialTime);
  628. return this;
  629. }
  630. /**
  631. * @param associationTime
  632. */
  633. public Builder associationTime(Date associationTime) {
  634. obj.setAssociationTime(associationTime);
  635. return this;
  636. }
  637. /**
  638. * 设置题源联想:json
  639. *
  640. * @param associationContent 题源联想:json
  641. */
  642. public Builder associationContent(Integer[] associationContent) {
  643. obj.setAssociationContent(associationContent);
  644. return this;
  645. }
  646. /**
  647. * 设置总作答时间
  648. *
  649. * @param totalTime 总作答时间
  650. */
  651. public Builder totalTime(Integer totalTime) {
  652. obj.setTotalTime(totalTime);
  653. return this;
  654. }
  655. /**
  656. * 设置总作答次数
  657. *
  658. * @param totalNumber 总作答次数
  659. */
  660. public Builder totalNumber(Integer totalNumber) {
  661. obj.setTotalNumber(totalNumber);
  662. return this;
  663. }
  664. /**
  665. * 设置总正确次数
  666. *
  667. * @param totalCorrect 总正确次数
  668. */
  669. public Builder totalCorrect(Integer totalCorrect) {
  670. obj.setTotalCorrect(totalCorrect);
  671. return this;
  672. }
  673. /**
  674. * 设置收藏数
  675. *
  676. * @param collectNumber 收藏数
  677. */
  678. public Builder collectNumber(Integer collectNumber) {
  679. obj.setCollectNumber(collectNumber);
  680. return this;
  681. }
  682. /**
  683. * @param createTime
  684. */
  685. public Builder createTime(Date createTime) {
  686. obj.setCreateTime(createTime);
  687. return this;
  688. }
  689. /**
  690. * @param updateTime
  691. */
  692. public Builder updateTime(Date updateTime) {
  693. obj.setUpdateTime(updateTime);
  694. return this;
  695. }
  696. /**
  697. * 设置题干
  698. *
  699. * @param stem 题干
  700. */
  701. public Builder stem(String stem) {
  702. obj.setStem(stem);
  703. return this;
  704. }
  705. /**
  706. * @param qxContent
  707. */
  708. public Builder qxContent(String qxContent) {
  709. obj.setQxContent(qxContent);
  710. return this;
  711. }
  712. /**
  713. * @param officialContent
  714. */
  715. public Builder officialContent(String officialContent) {
  716. obj.setOfficialContent(officialContent);
  717. return this;
  718. }
  719. /**
  720. * @param chineseContent
  721. */
  722. public Builder chineseContent(String chineseContent) {
  723. obj.setChineseContent(chineseContent);
  724. return this;
  725. }
  726. public Question build() {
  727. return this.obj;
  728. }
  729. }
  730. }