using Model.Entity.Config; namespace Model.Dto.Config { /// /// IOT 设备 DTO(Id 由 long 改为 string,避免前端精度丢失) /// public class IotDeviceDto { /// 主键 Id(long → string) public string Id { get; set; } /// 设备编号 public string Code { get; set; } /// 设备名称 public string Name { get; set; } /// 设备类型(型号,对应 DeviceCommand 驱动类) public string DeviceType { get; set; } /// 所属产品Id(string,0=未分类) public string ProductId { get; set; } /// 所属产品型号/名称(只读展示) public string? ProductName { get; set; } /// 所属网关Code public string GatewayCode { get; set; } /// 从站地址 public byte SlaveId { get; set; } /// 制造商 public string? Manufacturer { get; set; } /// 设备描述 public string? Description { get; set; } /// 通讯协议类型 public IotDeviceProtocolEnum ProtocolType { get; set; } /// 是否启用采集 public bool IsEnabled { get; set; } = true; /// 在线状态 public IotDeviceOnlineStatusEnum OnlineStatus { get; set; } /// 最后采集时间 public DateTime? LastCollectTime { get; set; } /// 最近错误信息 public string? LastError { get; set; } /// 备注 public string? Remark { get; set; } /// 创建时间 public DateTime? CreateTime { get; set; } } }