namespace CellularManagement.Domain.Models; /// /// 协议日志运行时设备树形结构DTO /// 用于表示按设备分组的运行时数据,便于前端渲染树形结构 /// public class ProtocolLogRuntimeDeviceTreeDto { /// /// 设备代码 /// public string DeviceCode { get; set; } = string.Empty; /// /// 设备名称(可选,用于显示) /// public string? DeviceName { get; set; } /// /// 该设备下的运行时列表 /// public List Runtimes { get; set; } = new(); /// /// 该设备下的运行时数量 /// public int RuntimeCount => Runtimes.Count; } /// /// 协议日志运行时信息 /// public class ProtocolLogRuntimeInfo { /// /// 运行时代码 /// public string RuntimeCode { get; set; } = string.Empty; /// /// 时间戳 /// public long Timestamp { get; set; } /// /// 格式化后的时间显示 /// public string FormattedTime => DateTimeOffset.FromUnixTimeMilliseconds(Timestamp).ToString("yyyy-MM-dd HH:mm:ss.fff"); }