You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.3 KiB
49 lines
1.3 KiB
namespace CellularManagement.Domain.Models;
|
|
|
|
/// <summary>
|
|
/// 协议日志运行时设备树形结构DTO
|
|
/// 用于表示按设备分组的运行时数据,便于前端渲染树形结构
|
|
/// </summary>
|
|
public class ProtocolLogRuntimeDeviceTreeDto
|
|
{
|
|
/// <summary>
|
|
/// 设备代码
|
|
/// </summary>
|
|
public string DeviceCode { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// 设备名称(可选,用于显示)
|
|
/// </summary>
|
|
public string? DeviceName { get; set; }
|
|
|
|
/// <summary>
|
|
/// 该设备下的运行时列表
|
|
/// </summary>
|
|
public List<ProtocolLogRuntimeInfo> Runtimes { get; set; } = new();
|
|
|
|
/// <summary>
|
|
/// 该设备下的运行时数量
|
|
/// </summary>
|
|
public int RuntimeCount => Runtimes.Count;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 协议日志运行时信息
|
|
/// </summary>
|
|
public class ProtocolLogRuntimeInfo
|
|
{
|
|
/// <summary>
|
|
/// 运行时代码
|
|
/// </summary>
|
|
public string RuntimeCode { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// 时间戳
|
|
/// </summary>
|
|
public long Timestamp { get; set; }
|
|
|
|
/// <summary>
|
|
/// 格式化后的时间显示
|
|
/// </summary>
|
|
public string FormattedTime => DateTimeOffset.FromUnixTimeMilliseconds(Timestamp).ToString("yyyy-MM-dd HH:mm:ss.fff");
|
|
}
|