1
0

CourseDataHistory.java 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300
  1. package com.qxgmat.data.dao.entity;
  2. import java.io.Serializable;
  3. import java.util.Date;
  4. import javax.persistence.*;
  5. @Table(name = "course_data_history")
  6. public class CourseDataHistory implements Serializable {
  7. @Id
  8. @Column(name = "`id`")
  9. @GeneratedValue(strategy = GenerationType.IDENTITY)
  10. private Integer id;
  11. /**
  12. * 资料id
  13. */
  14. @Column(name = "`data_id`")
  15. private Integer dataId;
  16. /**
  17. * 版本名称
  18. */
  19. @Column(name = "`version`")
  20. private String version;
  21. /**
  22. * 更新时间
  23. */
  24. @Column(name = "`time`")
  25. private Date time;
  26. /**
  27. * 更新位置
  28. */
  29. @Column(name = "`position`")
  30. private String position;
  31. @Column(name = "`create_time`")
  32. private Date createTime;
  33. /**
  34. * 原文
  35. */
  36. @Column(name = "`origin_content`")
  37. private String originContent;
  38. /**
  39. * 更正
  40. */
  41. @Column(name = "`content`")
  42. private String content;
  43. private static final long serialVersionUID = 1L;
  44. /**
  45. * @return id
  46. */
  47. public Integer getId() {
  48. return id;
  49. }
  50. /**
  51. * @param id
  52. */
  53. public void setId(Integer id) {
  54. this.id = id;
  55. }
  56. /**
  57. * 获取资料id
  58. *
  59. * @return data_id - 资料id
  60. */
  61. public Integer getDataId() {
  62. return dataId;
  63. }
  64. /**
  65. * 设置资料id
  66. *
  67. * @param dataId 资料id
  68. */
  69. public void setDataId(Integer dataId) {
  70. this.dataId = dataId;
  71. }
  72. /**
  73. * 获取版本名称
  74. *
  75. * @return version - 版本名称
  76. */
  77. public String getVersion() {
  78. return version;
  79. }
  80. /**
  81. * 设置版本名称
  82. *
  83. * @param version 版本名称
  84. */
  85. public void setVersion(String version) {
  86. this.version = version;
  87. }
  88. /**
  89. * 获取更新时间
  90. *
  91. * @return time - 更新时间
  92. */
  93. public Date getTime() {
  94. return time;
  95. }
  96. /**
  97. * 设置更新时间
  98. *
  99. * @param time 更新时间
  100. */
  101. public void setTime(Date time) {
  102. this.time = time;
  103. }
  104. /**
  105. * 获取更新位置
  106. *
  107. * @return position - 更新位置
  108. */
  109. public String getPosition() {
  110. return position;
  111. }
  112. /**
  113. * 设置更新位置
  114. *
  115. * @param position 更新位置
  116. */
  117. public void setPosition(String position) {
  118. this.position = position;
  119. }
  120. /**
  121. * @return create_time
  122. */
  123. public Date getCreateTime() {
  124. return createTime;
  125. }
  126. /**
  127. * @param createTime
  128. */
  129. public void setCreateTime(Date createTime) {
  130. this.createTime = createTime;
  131. }
  132. /**
  133. * 获取原文
  134. *
  135. * @return origin_content - 原文
  136. */
  137. public String getOriginContent() {
  138. return originContent;
  139. }
  140. /**
  141. * 设置原文
  142. *
  143. * @param originContent 原文
  144. */
  145. public void setOriginContent(String originContent) {
  146. this.originContent = originContent;
  147. }
  148. /**
  149. * 获取更正
  150. *
  151. * @return content - 更正
  152. */
  153. public String getContent() {
  154. return content;
  155. }
  156. /**
  157. * 设置更正
  158. *
  159. * @param content 更正
  160. */
  161. public void setContent(String content) {
  162. this.content = content;
  163. }
  164. @Override
  165. public String toString() {
  166. StringBuilder sb = new StringBuilder();
  167. sb.append(getClass().getSimpleName());
  168. sb.append(" [");
  169. sb.append("Hash = ").append(hashCode());
  170. sb.append(", id=").append(id);
  171. sb.append(", dataId=").append(dataId);
  172. sb.append(", version=").append(version);
  173. sb.append(", time=").append(time);
  174. sb.append(", position=").append(position);
  175. sb.append(", createTime=").append(createTime);
  176. sb.append(", originContent=").append(originContent);
  177. sb.append(", content=").append(content);
  178. sb.append("]");
  179. return sb.toString();
  180. }
  181. public static CourseDataHistory.Builder builder() {
  182. return new CourseDataHistory.Builder();
  183. }
  184. public static class Builder {
  185. private CourseDataHistory obj;
  186. public Builder() {
  187. this.obj = new CourseDataHistory();
  188. }
  189. /**
  190. * @param id
  191. */
  192. public Builder id(Integer id) {
  193. obj.setId(id);
  194. return this;
  195. }
  196. /**
  197. * 设置资料id
  198. *
  199. * @param dataId 资料id
  200. */
  201. public Builder dataId(Integer dataId) {
  202. obj.setDataId(dataId);
  203. return this;
  204. }
  205. /**
  206. * 设置版本名称
  207. *
  208. * @param version 版本名称
  209. */
  210. public Builder version(String version) {
  211. obj.setVersion(version);
  212. return this;
  213. }
  214. /**
  215. * 设置更新时间
  216. *
  217. * @param time 更新时间
  218. */
  219. public Builder time(Date time) {
  220. obj.setTime(time);
  221. return this;
  222. }
  223. /**
  224. * 设置更新位置
  225. *
  226. * @param position 更新位置
  227. */
  228. public Builder position(String position) {
  229. obj.setPosition(position);
  230. return this;
  231. }
  232. /**
  233. * @param createTime
  234. */
  235. public Builder createTime(Date createTime) {
  236. obj.setCreateTime(createTime);
  237. return this;
  238. }
  239. /**
  240. * 设置原文
  241. *
  242. * @param originContent 原文
  243. */
  244. public Builder originContent(String originContent) {
  245. obj.setOriginContent(originContent);
  246. return this;
  247. }
  248. /**
  249. * 设置更正
  250. *
  251. * @param content 更正
  252. */
  253. public Builder content(String content) {
  254. obj.setContent(content);
  255. return this;
  256. }
  257. public CourseDataHistory build() {
  258. return this.obj;
  259. }
  260. }
  261. }