123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370 |
- package com.qxgmat.data.dao.entity;
- import java.io.Serializable;
- import java.util.Date;
- import javax.persistence.*;
- @Table(name = "message_template")
- public class MessageTemplate implements Serializable {
- @Id
- @Column(name = "`id`")
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- private Integer id;
- /**
- * 消息标题
- */
- @Column(name = "`title`")
- private String title;
- /**
- * 消息形式
- */
- @Column(name = "`message_method`")
- private String messageMethod;
- /**
- * 消息类型
- */
- @Column(name = "`message_category`")
- private String messageCategory;
- /**
- * 消息链接
- */
- @Column(name = "`link`")
- private String link;
- /**
- * 发送时间
- */
- @Column(name = "`send_time`")
- private Date sendTime;
- /**
- * 发送数量
- */
- @Column(name = "`send_number`")
- private Integer sendNumber;
- /**
- * 发送状态:0未发送,1发送中,2发送完成
- */
- @Column(name = "`send_status`")
- private Integer sendStatus;
- @Column(name = "`create_time`")
- private Date createTime;
- /**
- * 消息内容
- */
- @Column(name = "`content`")
- private String content;
- private static final long serialVersionUID = 1L;
- /**
- * @return id
- */
- public Integer getId() {
- return id;
- }
- /**
- * @param id
- */
- public void setId(Integer id) {
- this.id = id;
- }
- /**
- * 获取消息标题
- *
- * @return title - 消息标题
- */
- public String getTitle() {
- return title;
- }
- /**
- * 设置消息标题
- *
- * @param title 消息标题
- */
- public void setTitle(String title) {
- this.title = title;
- }
- /**
- * 获取消息形式
- *
- * @return message_method - 消息形式
- */
- public String getMessageMethod() {
- return messageMethod;
- }
- /**
- * 设置消息形式
- *
- * @param messageMethod 消息形式
- */
- public void setMessageMethod(String messageMethod) {
- this.messageMethod = messageMethod;
- }
- /**
- * 获取消息类型
- *
- * @return message_category - 消息类型
- */
- public String getMessageCategory() {
- return messageCategory;
- }
- /**
- * 设置消息类型
- *
- * @param messageCategory 消息类型
- */
- public void setMessageCategory(String messageCategory) {
- this.messageCategory = messageCategory;
- }
- /**
- * 获取消息链接
- *
- * @return link - 消息链接
- */
- public String getLink() {
- return link;
- }
- /**
- * 设置消息链接
- *
- * @param link 消息链接
- */
- public void setLink(String link) {
- this.link = link;
- }
- /**
- * 获取发送时间
- *
- * @return send_time - 发送时间
- */
- public Date getSendTime() {
- return sendTime;
- }
- /**
- * 设置发送时间
- *
- * @param sendTime 发送时间
- */
- public void setSendTime(Date sendTime) {
- this.sendTime = sendTime;
- }
- /**
- * 获取发送数量
- *
- * @return send_number - 发送数量
- */
- public Integer getSendNumber() {
- return sendNumber;
- }
- /**
- * 设置发送数量
- *
- * @param sendNumber 发送数量
- */
- public void setSendNumber(Integer sendNumber) {
- this.sendNumber = sendNumber;
- }
- /**
- * 获取发送状态:0未发送,1发送中,2发送完成
- *
- * @return send_status - 发送状态:0未发送,1发送中,2发送完成
- */
- public Integer getSendStatus() {
- return sendStatus;
- }
- /**
- * 设置发送状态:0未发送,1发送中,2发送完成
- *
- * @param sendStatus 发送状态:0未发送,1发送中,2发送完成
- */
- public void setSendStatus(Integer sendStatus) {
- this.sendStatus = sendStatus;
- }
- /**
- * @return create_time
- */
- public Date getCreateTime() {
- return createTime;
- }
- /**
- * @param createTime
- */
- public void setCreateTime(Date createTime) {
- this.createTime = createTime;
- }
- /**
- * 获取消息内容
- *
- * @return content - 消息内容
- */
- public String getContent() {
- return content;
- }
- /**
- * 设置消息内容
- *
- * @param content 消息内容
- */
- public void setContent(String content) {
- this.content = content;
- }
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append(getClass().getSimpleName());
- sb.append(" [");
- sb.append("Hash = ").append(hashCode());
- sb.append(", id=").append(id);
- sb.append(", title=").append(title);
- sb.append(", messageMethod=").append(messageMethod);
- sb.append(", messageCategory=").append(messageCategory);
- sb.append(", link=").append(link);
- sb.append(", sendTime=").append(sendTime);
- sb.append(", sendNumber=").append(sendNumber);
- sb.append(", sendStatus=").append(sendStatus);
- sb.append(", createTime=").append(createTime);
- sb.append(", content=").append(content);
- sb.append("]");
- return sb.toString();
- }
- public static MessageTemplate.Builder builder() {
- return new MessageTemplate.Builder();
- }
- public static class Builder {
- private MessageTemplate obj;
- public Builder() {
- this.obj = new MessageTemplate();
- }
- /**
- * @param id
- */
- public Builder id(Integer id) {
- obj.setId(id);
- return this;
- }
- /**
- * 设置消息标题
- *
- * @param title 消息标题
- */
- public Builder title(String title) {
- obj.setTitle(title);
- return this;
- }
- /**
- * 设置消息形式
- *
- * @param messageMethod 消息形式
- */
- public Builder messageMethod(String messageMethod) {
- obj.setMessageMethod(messageMethod);
- return this;
- }
- /**
- * 设置消息类型
- *
- * @param messageCategory 消息类型
- */
- public Builder messageCategory(String messageCategory) {
- obj.setMessageCategory(messageCategory);
- return this;
- }
- /**
- * 设置消息链接
- *
- * @param link 消息链接
- */
- public Builder link(String link) {
- obj.setLink(link);
- return this;
- }
- /**
- * 设置发送时间
- *
- * @param sendTime 发送时间
- */
- public Builder sendTime(Date sendTime) {
- obj.setSendTime(sendTime);
- return this;
- }
- /**
- * 设置发送数量
- *
- * @param sendNumber 发送数量
- */
- public Builder sendNumber(Integer sendNumber) {
- obj.setSendNumber(sendNumber);
- return this;
- }
- /**
- * 设置发送状态:0未发送,1发送中,2发送完成
- *
- * @param sendStatus 发送状态:0未发送,1发送中,2发送完成
- */
- public Builder sendStatus(Integer sendStatus) {
- obj.setSendStatus(sendStatus);
- return this;
- }
- /**
- * @param createTime
- */
- public Builder createTime(Date createTime) {
- obj.setCreateTime(createTime);
- return this;
- }
- /**
- * 设置消息内容
- *
- * @param content 消息内容
- */
- public Builder content(String content) {
- obj.setContent(content);
- return this;
- }
- public MessageTemplate build() {
- return this.obj;
- }
- }
- }
|