using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace MoviconHub.App.Models { /// /// 设备状态数据模型 /// Websocket数据格式 /// public class DeviceStatusData { /// /// 设备ID /// [JsonProperty("device_id")] public string DeviceId { get; set; } /// /// 设备名称 /// [JsonProperty("device_name")] public string DeviceName { get; set; } /// /// 设备状态(开启/关闭/运行中/待机) /// [JsonProperty("status")] public string Status { get; set; } /// /// 电压值 /// [JsonProperty("voltage")] public double Voltage { get; set; } /// /// 电流值 /// [JsonProperty("current")] public double Current { get; set; } /// /// 温度值 /// [JsonProperty("temperature")] public double Temperature { get; set; } /// /// 其他自定义状态参数 /// [JsonProperty("parameters")] public Dictionary Parameters { get; set; } = new Dictionary(); /// /// 记录时间 /// [JsonProperty("record_time")] public DateTime RecordTime { get; set; } = DateTime.Now; } }