package zd.common.mqtt.config;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * 发送请求体
 * @Author: zhoupan
 * @Date: 2021/10/08/10:46
 * @Description:
 */
public class MessageBody<T> {

    public static DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
    T data;

    String msg;

    String sendDate;

    public MessageBody() {
        //获取当前时间
        LocalDateTime newTime = LocalDateTime.now();
        String format = formatter.format(newTime);
        this.sendDate = format;
    }

    public String getSendDate() {
        return sendDate;
    }

    public void setSendDate(String sendDate) {
        this.sendDate = sendDate;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
