using Newtonsoft.Json;
using System;
using System.Collections.Generic;
namespace POSV.DevOps.Entity
{
///
/// MQTT消息类型
///
public enum MqttNotifyEnum
{
None,
加载目录,
下载日志,
消息提醒,
在线门店,
收银机资源,
收银机进程,
数据更新,
}
///
/// MQTT消息实体
///
[Serializable]
[JsonObject(MemberSerialization.OptIn)]
public class MqttNotify
{
///
/// 消息类型
///
[JsonProperty(PropertyName = "type")]
public string Type { get; set; }
[JsonIgnore]
public MqttNotifyEnum NotifyType { get; set; }
///
/// 消息子类型
///
[JsonProperty(PropertyName = "sub_type")]
public string SubType { get; set; } = string.Empty;
///
/// 消息发送时间 yyyy-MM-dd HH:mm:ss
///
[JsonProperty(PropertyName = "send_date")]
public string SendDate { get; set; } = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
///
/// 内容
///
[JsonProperty(PropertyName = "data")]
public string Data { get; set; } = string.Empty;
}
}