UserAskQuestion.java 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746
  1. package com.qxgmat.data.dao.entity;
  2. import java.io.Serializable;
  3. import java.util.Date;
  4. import javax.persistence.*;
  5. @Table(name = "user_ask_question")
  6. public class UserAskQuestion implements Serializable {
  7. @Id
  8. @Column(name = "`id`")
  9. @GeneratedValue(strategy = GenerationType.IDENTITY)
  10. private Integer id;
  11. /**
  12. * 用户id
  13. */
  14. @Column(name = "`user_id`")
  15. private Integer userId;
  16. /**
  17. * 用户做题id
  18. */
  19. @Column(name = "`user_question_id`")
  20. private Integer userQuestionId;
  21. /**
  22. * 题目板块
  23. */
  24. @Column(name = "`ask_module`")
  25. private String askModule;
  26. /**
  27. * 题目模块
  28. */
  29. @Column(name = "`question_module`")
  30. private String questionModule;
  31. /**
  32. * 题目id
  33. */
  34. @Column(name = "`question_id`")
  35. private Integer questionId;
  36. /**
  37. * 题目编号id
  38. */
  39. @Column(name = "`question_no_id`")
  40. private Integer questionNoId;
  41. /**
  42. * 课程对应recordid
  43. */
  44. @Column(name = "`record_id`")
  45. private Integer recordId;
  46. /**
  47. * 问题对象:question,official,qx,association
  48. */
  49. @Column(name = "`target`")
  50. private String target;
  51. /**
  52. * 提问优先回答时间
  53. */
  54. @Column(name = "`ask_time`")
  55. private Integer askTime;
  56. /**
  57. * 过期时间
  58. */
  59. @Column(name = "`expire_time`")
  60. private Date expireTime;
  61. /**
  62. * 回答状态: 0未回答,1回答,2忽略
  63. */
  64. @Column(name = "`answer_status`")
  65. private Integer answerStatus;
  66. /**
  67. * 回答人id
  68. */
  69. @Column(name = "`manager_id`")
  70. private Integer managerId;
  71. /**
  72. * 展示状态:0关闭,1打开
  73. */
  74. @Column(name = "`show_status`")
  75. private Integer showStatus;
  76. /**
  77. * 回答时间
  78. */
  79. @Column(name = "`answer_time`")
  80. private Date answerTime;
  81. /**
  82. * 排序:从大到小
  83. */
  84. @Column(name = "`sort`")
  85. private Integer sort;
  86. @Column(name = "`create_time`")
  87. private Date createTime;
  88. @Column(name = "`update_time`")
  89. private Date updateTime;
  90. /**
  91. * 问题内容
  92. */
  93. @Column(name = "`origin_content`")
  94. private String originContent;
  95. /**
  96. * 提问
  97. */
  98. @Column(name = "`content`")
  99. private String content;
  100. /**
  101. * 回答
  102. */
  103. @Column(name = "`answer`")
  104. private String answer;
  105. private static final long serialVersionUID = 1L;
  106. /**
  107. * @return id
  108. */
  109. public Integer getId() {
  110. return id;
  111. }
  112. /**
  113. * @param id
  114. */
  115. public void setId(Integer id) {
  116. this.id = id;
  117. }
  118. /**
  119. * 获取用户id
  120. *
  121. * @return user_id - 用户id
  122. */
  123. public Integer getUserId() {
  124. return userId;
  125. }
  126. /**
  127. * 设置用户id
  128. *
  129. * @param userId 用户id
  130. */
  131. public void setUserId(Integer userId) {
  132. this.userId = userId;
  133. }
  134. /**
  135. * 获取用户做题id
  136. *
  137. * @return user_question_id - 用户做题id
  138. */
  139. public Integer getUserQuestionId() {
  140. return userQuestionId;
  141. }
  142. /**
  143. * 设置用户做题id
  144. *
  145. * @param userQuestionId 用户做题id
  146. */
  147. public void setUserQuestionId(Integer userQuestionId) {
  148. this.userQuestionId = userQuestionId;
  149. }
  150. /**
  151. * 获取题目板块
  152. *
  153. * @return ask_module - 题目板块
  154. */
  155. public String getAskModule() {
  156. return askModule;
  157. }
  158. /**
  159. * 设置题目板块
  160. *
  161. * @param askModule 题目板块
  162. */
  163. public void setAskModule(String askModule) {
  164. this.askModule = askModule;
  165. }
  166. /**
  167. * 获取题目模块
  168. *
  169. * @return question_module - 题目模块
  170. */
  171. public String getQuestionModule() {
  172. return questionModule;
  173. }
  174. /**
  175. * 设置题目模块
  176. *
  177. * @param questionModule 题目模块
  178. */
  179. public void setQuestionModule(String questionModule) {
  180. this.questionModule = questionModule;
  181. }
  182. /**
  183. * 获取题目id
  184. *
  185. * @return question_id - 题目id
  186. */
  187. public Integer getQuestionId() {
  188. return questionId;
  189. }
  190. /**
  191. * 设置题目id
  192. *
  193. * @param questionId 题目id
  194. */
  195. public void setQuestionId(Integer questionId) {
  196. this.questionId = questionId;
  197. }
  198. /**
  199. * 获取题目编号id
  200. *
  201. * @return question_no_id - 题目编号id
  202. */
  203. public Integer getQuestionNoId() {
  204. return questionNoId;
  205. }
  206. /**
  207. * 设置题目编号id
  208. *
  209. * @param questionNoId 题目编号id
  210. */
  211. public void setQuestionNoId(Integer questionNoId) {
  212. this.questionNoId = questionNoId;
  213. }
  214. /**
  215. * 获取课程对应recordid
  216. *
  217. * @return record_id - 课程对应recordid
  218. */
  219. public Integer getRecordId() {
  220. return recordId;
  221. }
  222. /**
  223. * 设置课程对应recordid
  224. *
  225. * @param recordId 课程对应recordid
  226. */
  227. public void setRecordId(Integer recordId) {
  228. this.recordId = recordId;
  229. }
  230. /**
  231. * 获取问题对象:question,official,qx,association
  232. *
  233. * @return target - 问题对象:question,official,qx,association
  234. */
  235. public String getTarget() {
  236. return target;
  237. }
  238. /**
  239. * 设置问题对象:question,official,qx,association
  240. *
  241. * @param target 问题对象:question,official,qx,association
  242. */
  243. public void setTarget(String target) {
  244. this.target = target;
  245. }
  246. /**
  247. * 获取提问优先回答时间
  248. *
  249. * @return ask_time - 提问优先回答时间
  250. */
  251. public Integer getAskTime() {
  252. return askTime;
  253. }
  254. /**
  255. * 设置提问优先回答时间
  256. *
  257. * @param askTime 提问优先回答时间
  258. */
  259. public void setAskTime(Integer askTime) {
  260. this.askTime = askTime;
  261. }
  262. /**
  263. * 获取过期时间
  264. *
  265. * @return expire_time - 过期时间
  266. */
  267. public Date getExpireTime() {
  268. return expireTime;
  269. }
  270. /**
  271. * 设置过期时间
  272. *
  273. * @param expireTime 过期时间
  274. */
  275. public void setExpireTime(Date expireTime) {
  276. this.expireTime = expireTime;
  277. }
  278. /**
  279. * 获取回答状态: 0未回答,1回答,2忽略
  280. *
  281. * @return answer_status - 回答状态: 0未回答,1回答,2忽略
  282. */
  283. public Integer getAnswerStatus() {
  284. return answerStatus;
  285. }
  286. /**
  287. * 设置回答状态: 0未回答,1回答,2忽略
  288. *
  289. * @param answerStatus 回答状态: 0未回答,1回答,2忽略
  290. */
  291. public void setAnswerStatus(Integer answerStatus) {
  292. this.answerStatus = answerStatus;
  293. }
  294. /**
  295. * 获取回答人id
  296. *
  297. * @return manager_id - 回答人id
  298. */
  299. public Integer getManagerId() {
  300. return managerId;
  301. }
  302. /**
  303. * 设置回答人id
  304. *
  305. * @param managerId 回答人id
  306. */
  307. public void setManagerId(Integer managerId) {
  308. this.managerId = managerId;
  309. }
  310. /**
  311. * 获取展示状态:0关闭,1打开
  312. *
  313. * @return show_status - 展示状态:0关闭,1打开
  314. */
  315. public Integer getShowStatus() {
  316. return showStatus;
  317. }
  318. /**
  319. * 设置展示状态:0关闭,1打开
  320. *
  321. * @param showStatus 展示状态:0关闭,1打开
  322. */
  323. public void setShowStatus(Integer showStatus) {
  324. this.showStatus = showStatus;
  325. }
  326. /**
  327. * 获取回答时间
  328. *
  329. * @return answer_time - 回答时间
  330. */
  331. public Date getAnswerTime() {
  332. return answerTime;
  333. }
  334. /**
  335. * 设置回答时间
  336. *
  337. * @param answerTime 回答时间
  338. */
  339. public void setAnswerTime(Date answerTime) {
  340. this.answerTime = answerTime;
  341. }
  342. /**
  343. * 获取排序:从大到小
  344. *
  345. * @return sort - 排序:从大到小
  346. */
  347. public Integer getSort() {
  348. return sort;
  349. }
  350. /**
  351. * 设置排序:从大到小
  352. *
  353. * @param sort 排序:从大到小
  354. */
  355. public void setSort(Integer sort) {
  356. this.sort = sort;
  357. }
  358. /**
  359. * @return create_time
  360. */
  361. public Date getCreateTime() {
  362. return createTime;
  363. }
  364. /**
  365. * @param createTime
  366. */
  367. public void setCreateTime(Date createTime) {
  368. this.createTime = createTime;
  369. }
  370. /**
  371. * @return update_time
  372. */
  373. public Date getUpdateTime() {
  374. return updateTime;
  375. }
  376. /**
  377. * @param updateTime
  378. */
  379. public void setUpdateTime(Date updateTime) {
  380. this.updateTime = updateTime;
  381. }
  382. /**
  383. * 获取问题内容
  384. *
  385. * @return origin_content - 问题内容
  386. */
  387. public String getOriginContent() {
  388. return originContent;
  389. }
  390. /**
  391. * 设置问题内容
  392. *
  393. * @param originContent 问题内容
  394. */
  395. public void setOriginContent(String originContent) {
  396. this.originContent = originContent;
  397. }
  398. /**
  399. * 获取提问
  400. *
  401. * @return content - 提问
  402. */
  403. public String getContent() {
  404. return content;
  405. }
  406. /**
  407. * 设置提问
  408. *
  409. * @param content 提问
  410. */
  411. public void setContent(String content) {
  412. this.content = content;
  413. }
  414. /**
  415. * 获取回答
  416. *
  417. * @return answer - 回答
  418. */
  419. public String getAnswer() {
  420. return answer;
  421. }
  422. /**
  423. * 设置回答
  424. *
  425. * @param answer 回答
  426. */
  427. public void setAnswer(String answer) {
  428. this.answer = answer;
  429. }
  430. @Override
  431. public String toString() {
  432. StringBuilder sb = new StringBuilder();
  433. sb.append(getClass().getSimpleName());
  434. sb.append(" [");
  435. sb.append("Hash = ").append(hashCode());
  436. sb.append(", id=").append(id);
  437. sb.append(", userId=").append(userId);
  438. sb.append(", userQuestionId=").append(userQuestionId);
  439. sb.append(", askModule=").append(askModule);
  440. sb.append(", questionModule=").append(questionModule);
  441. sb.append(", questionId=").append(questionId);
  442. sb.append(", questionNoId=").append(questionNoId);
  443. sb.append(", recordId=").append(recordId);
  444. sb.append(", target=").append(target);
  445. sb.append(", askTime=").append(askTime);
  446. sb.append(", expireTime=").append(expireTime);
  447. sb.append(", answerStatus=").append(answerStatus);
  448. sb.append(", managerId=").append(managerId);
  449. sb.append(", showStatus=").append(showStatus);
  450. sb.append(", answerTime=").append(answerTime);
  451. sb.append(", sort=").append(sort);
  452. sb.append(", createTime=").append(createTime);
  453. sb.append(", updateTime=").append(updateTime);
  454. sb.append(", originContent=").append(originContent);
  455. sb.append(", content=").append(content);
  456. sb.append(", answer=").append(answer);
  457. sb.append("]");
  458. return sb.toString();
  459. }
  460. public static UserAskQuestion.Builder builder() {
  461. return new UserAskQuestion.Builder();
  462. }
  463. public static class Builder {
  464. private UserAskQuestion obj;
  465. public Builder() {
  466. this.obj = new UserAskQuestion();
  467. }
  468. /**
  469. * @param id
  470. */
  471. public Builder id(Integer id) {
  472. obj.setId(id);
  473. return this;
  474. }
  475. /**
  476. * 设置用户id
  477. *
  478. * @param userId 用户id
  479. */
  480. public Builder userId(Integer userId) {
  481. obj.setUserId(userId);
  482. return this;
  483. }
  484. /**
  485. * 设置用户做题id
  486. *
  487. * @param userQuestionId 用户做题id
  488. */
  489. public Builder userQuestionId(Integer userQuestionId) {
  490. obj.setUserQuestionId(userQuestionId);
  491. return this;
  492. }
  493. /**
  494. * 设置题目板块
  495. *
  496. * @param askModule 题目板块
  497. */
  498. public Builder askModule(String askModule) {
  499. obj.setAskModule(askModule);
  500. return this;
  501. }
  502. /**
  503. * 设置题目模块
  504. *
  505. * @param questionModule 题目模块
  506. */
  507. public Builder questionModule(String questionModule) {
  508. obj.setQuestionModule(questionModule);
  509. return this;
  510. }
  511. /**
  512. * 设置题目id
  513. *
  514. * @param questionId 题目id
  515. */
  516. public Builder questionId(Integer questionId) {
  517. obj.setQuestionId(questionId);
  518. return this;
  519. }
  520. /**
  521. * 设置题目编号id
  522. *
  523. * @param questionNoId 题目编号id
  524. */
  525. public Builder questionNoId(Integer questionNoId) {
  526. obj.setQuestionNoId(questionNoId);
  527. return this;
  528. }
  529. /**
  530. * 设置课程对应recordid
  531. *
  532. * @param recordId 课程对应recordid
  533. */
  534. public Builder recordId(Integer recordId) {
  535. obj.setRecordId(recordId);
  536. return this;
  537. }
  538. /**
  539. * 设置问题对象:question,official,qx,association
  540. *
  541. * @param target 问题对象:question,official,qx,association
  542. */
  543. public Builder target(String target) {
  544. obj.setTarget(target);
  545. return this;
  546. }
  547. /**
  548. * 设置提问优先回答时间
  549. *
  550. * @param askTime 提问优先回答时间
  551. */
  552. public Builder askTime(Integer askTime) {
  553. obj.setAskTime(askTime);
  554. return this;
  555. }
  556. /**
  557. * 设置过期时间
  558. *
  559. * @param expireTime 过期时间
  560. */
  561. public Builder expireTime(Date expireTime) {
  562. obj.setExpireTime(expireTime);
  563. return this;
  564. }
  565. /**
  566. * 设置回答
  567. *
  568. * @param answer 回答
  569. */
  570. public Builder answer(String answer) {
  571. obj.setAnswer(answer);
  572. return this;
  573. }
  574. /**
  575. * 设置回答状态: 0未回答,1回答,2忽略
  576. *
  577. * @param answerStatus 回答状态: 0未回答,1回答,2忽略
  578. */
  579. public Builder answerStatus(Integer answerStatus) {
  580. obj.setAnswerStatus(answerStatus);
  581. return this;
  582. }
  583. /**
  584. * 设置回答人id
  585. *
  586. * @param managerId 回答人id
  587. */
  588. public Builder managerId(Integer managerId) {
  589. obj.setManagerId(managerId);
  590. return this;
  591. }
  592. /**
  593. * 设置展示状态:0关闭,1打开
  594. *
  595. * @param showStatus 展示状态:0关闭,1打开
  596. */
  597. public Builder showStatus(Integer showStatus) {
  598. obj.setShowStatus(showStatus);
  599. return this;
  600. }
  601. /**
  602. * 设置回答时间
  603. *
  604. * @param answerTime 回答时间
  605. */
  606. public Builder answerTime(Date answerTime) {
  607. obj.setAnswerTime(answerTime);
  608. return this;
  609. }
  610. /**
  611. * 设置排序:从大到小
  612. *
  613. * @param sort 排序:从大到小
  614. */
  615. public Builder sort(Integer sort) {
  616. obj.setSort(sort);
  617. return this;
  618. }
  619. /**
  620. * @param createTime
  621. */
  622. public Builder createTime(Date createTime) {
  623. obj.setCreateTime(createTime);
  624. return this;
  625. }
  626. /**
  627. * @param updateTime
  628. */
  629. public Builder updateTime(Date updateTime) {
  630. obj.setUpdateTime(updateTime);
  631. return this;
  632. }
  633. /**
  634. * 设置问题内容
  635. *
  636. * @param originContent 问题内容
  637. */
  638. public Builder originContent(String originContent) {
  639. obj.setOriginContent(originContent);
  640. return this;
  641. }
  642. /**
  643. * 设置提问
  644. *
  645. * @param content 提问
  646. */
  647. public Builder content(String content) {
  648. obj.setContent(content);
  649. return this;
  650. }
  651. public UserAskQuestion build() {
  652. return this.obj;
  653. }
  654. }
  655. }