1
0

MessageTemplate.java 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370
  1. package com.qxgmat.data.dao.entity;
  2. import java.io.Serializable;
  3. import java.util.Date;
  4. import javax.persistence.*;
  5. @Table(name = "message_template")
  6. public class MessageTemplate implements Serializable {
  7. @Id
  8. @Column(name = "`id`")
  9. @GeneratedValue(strategy = GenerationType.IDENTITY)
  10. private Integer id;
  11. /**
  12. * 消息标题
  13. */
  14. @Column(name = "`title`")
  15. private String title;
  16. /**
  17. * 消息形式
  18. */
  19. @Column(name = "`message_method`")
  20. private String messageMethod;
  21. /**
  22. * 消息类型
  23. */
  24. @Column(name = "`message_category`")
  25. private String messageCategory;
  26. /**
  27. * 消息链接
  28. */
  29. @Column(name = "`link`")
  30. private String link;
  31. /**
  32. * 发送时间
  33. */
  34. @Column(name = "`send_time`")
  35. private Date sendTime;
  36. /**
  37. * 发送数量
  38. */
  39. @Column(name = "`send_number`")
  40. private Integer sendNumber;
  41. /**
  42. * 发送状态:0未发送,1发送中,2发送完成
  43. */
  44. @Column(name = "`send_status`")
  45. private Integer sendStatus;
  46. @Column(name = "`create_time`")
  47. private Date createTime;
  48. /**
  49. * 消息内容
  50. */
  51. @Column(name = "`content`")
  52. private String content;
  53. private static final long serialVersionUID = 1L;
  54. /**
  55. * @return id
  56. */
  57. public Integer getId() {
  58. return id;
  59. }
  60. /**
  61. * @param id
  62. */
  63. public void setId(Integer id) {
  64. this.id = id;
  65. }
  66. /**
  67. * 获取消息标题
  68. *
  69. * @return title - 消息标题
  70. */
  71. public String getTitle() {
  72. return title;
  73. }
  74. /**
  75. * 设置消息标题
  76. *
  77. * @param title 消息标题
  78. */
  79. public void setTitle(String title) {
  80. this.title = title;
  81. }
  82. /**
  83. * 获取消息形式
  84. *
  85. * @return message_method - 消息形式
  86. */
  87. public String getMessageMethod() {
  88. return messageMethod;
  89. }
  90. /**
  91. * 设置消息形式
  92. *
  93. * @param messageMethod 消息形式
  94. */
  95. public void setMessageMethod(String messageMethod) {
  96. this.messageMethod = messageMethod;
  97. }
  98. /**
  99. * 获取消息类型
  100. *
  101. * @return message_category - 消息类型
  102. */
  103. public String getMessageCategory() {
  104. return messageCategory;
  105. }
  106. /**
  107. * 设置消息类型
  108. *
  109. * @param messageCategory 消息类型
  110. */
  111. public void setMessageCategory(String messageCategory) {
  112. this.messageCategory = messageCategory;
  113. }
  114. /**
  115. * 获取消息链接
  116. *
  117. * @return link - 消息链接
  118. */
  119. public String getLink() {
  120. return link;
  121. }
  122. /**
  123. * 设置消息链接
  124. *
  125. * @param link 消息链接
  126. */
  127. public void setLink(String link) {
  128. this.link = link;
  129. }
  130. /**
  131. * 获取发送时间
  132. *
  133. * @return send_time - 发送时间
  134. */
  135. public Date getSendTime() {
  136. return sendTime;
  137. }
  138. /**
  139. * 设置发送时间
  140. *
  141. * @param sendTime 发送时间
  142. */
  143. public void setSendTime(Date sendTime) {
  144. this.sendTime = sendTime;
  145. }
  146. /**
  147. * 获取发送数量
  148. *
  149. * @return send_number - 发送数量
  150. */
  151. public Integer getSendNumber() {
  152. return sendNumber;
  153. }
  154. /**
  155. * 设置发送数量
  156. *
  157. * @param sendNumber 发送数量
  158. */
  159. public void setSendNumber(Integer sendNumber) {
  160. this.sendNumber = sendNumber;
  161. }
  162. /**
  163. * 获取发送状态:0未发送,1发送中,2发送完成
  164. *
  165. * @return send_status - 发送状态:0未发送,1发送中,2发送完成
  166. */
  167. public Integer getSendStatus() {
  168. return sendStatus;
  169. }
  170. /**
  171. * 设置发送状态:0未发送,1发送中,2发送完成
  172. *
  173. * @param sendStatus 发送状态:0未发送,1发送中,2发送完成
  174. */
  175. public void setSendStatus(Integer sendStatus) {
  176. this.sendStatus = sendStatus;
  177. }
  178. /**
  179. * @return create_time
  180. */
  181. public Date getCreateTime() {
  182. return createTime;
  183. }
  184. /**
  185. * @param createTime
  186. */
  187. public void setCreateTime(Date createTime) {
  188. this.createTime = createTime;
  189. }
  190. /**
  191. * 获取消息内容
  192. *
  193. * @return content - 消息内容
  194. */
  195. public String getContent() {
  196. return content;
  197. }
  198. /**
  199. * 设置消息内容
  200. *
  201. * @param content 消息内容
  202. */
  203. public void setContent(String content) {
  204. this.content = content;
  205. }
  206. @Override
  207. public String toString() {
  208. StringBuilder sb = new StringBuilder();
  209. sb.append(getClass().getSimpleName());
  210. sb.append(" [");
  211. sb.append("Hash = ").append(hashCode());
  212. sb.append(", id=").append(id);
  213. sb.append(", title=").append(title);
  214. sb.append(", messageMethod=").append(messageMethod);
  215. sb.append(", messageCategory=").append(messageCategory);
  216. sb.append(", link=").append(link);
  217. sb.append(", sendTime=").append(sendTime);
  218. sb.append(", sendNumber=").append(sendNumber);
  219. sb.append(", sendStatus=").append(sendStatus);
  220. sb.append(", createTime=").append(createTime);
  221. sb.append(", content=").append(content);
  222. sb.append("]");
  223. return sb.toString();
  224. }
  225. public static MessageTemplate.Builder builder() {
  226. return new MessageTemplate.Builder();
  227. }
  228. public static class Builder {
  229. private MessageTemplate obj;
  230. public Builder() {
  231. this.obj = new MessageTemplate();
  232. }
  233. /**
  234. * @param id
  235. */
  236. public Builder id(Integer id) {
  237. obj.setId(id);
  238. return this;
  239. }
  240. /**
  241. * 设置消息标题
  242. *
  243. * @param title 消息标题
  244. */
  245. public Builder title(String title) {
  246. obj.setTitle(title);
  247. return this;
  248. }
  249. /**
  250. * 设置消息形式
  251. *
  252. * @param messageMethod 消息形式
  253. */
  254. public Builder messageMethod(String messageMethod) {
  255. obj.setMessageMethod(messageMethod);
  256. return this;
  257. }
  258. /**
  259. * 设置消息类型
  260. *
  261. * @param messageCategory 消息类型
  262. */
  263. public Builder messageCategory(String messageCategory) {
  264. obj.setMessageCategory(messageCategory);
  265. return this;
  266. }
  267. /**
  268. * 设置消息链接
  269. *
  270. * @param link 消息链接
  271. */
  272. public Builder link(String link) {
  273. obj.setLink(link);
  274. return this;
  275. }
  276. /**
  277. * 设置发送时间
  278. *
  279. * @param sendTime 发送时间
  280. */
  281. public Builder sendTime(Date sendTime) {
  282. obj.setSendTime(sendTime);
  283. return this;
  284. }
  285. /**
  286. * 设置发送数量
  287. *
  288. * @param sendNumber 发送数量
  289. */
  290. public Builder sendNumber(Integer sendNumber) {
  291. obj.setSendNumber(sendNumber);
  292. return this;
  293. }
  294. /**
  295. * 设置发送状态:0未发送,1发送中,2发送完成
  296. *
  297. * @param sendStatus 发送状态:0未发送,1发送中,2发送完成
  298. */
  299. public Builder sendStatus(Integer sendStatus) {
  300. obj.setSendStatus(sendStatus);
  301. return this;
  302. }
  303. /**
  304. * @param createTime
  305. */
  306. public Builder createTime(Date createTime) {
  307. obj.setCreateTime(createTime);
  308. return this;
  309. }
  310. /**
  311. * 设置消息内容
  312. *
  313. * @param content 消息内容
  314. */
  315. public Builder content(String content) {
  316. obj.setContent(content);
  317. return this;
  318. }
  319. public MessageTemplate build() {
  320. return this.obj;
  321. }
  322. }
  323. }