Browse Source
- 新增DeviceInfoResponse模型,专门用于API响应 - 移除API响应中的IsSuccess字段,确保响应简洁 - 修改GetSerialNumberCommand返回类型为ApiActionResult<DeviceInfoResponse> - 更新GetSerialNumberCommandHandler使用DeviceInfoResponse - 实现清晰的职责分离:DeviceInfo用于内部状态判断,DeviceInfoResponse用于API响应 - 确保API响应不包含内部实现细节feature/protocol-log-Perfect
4 changed files with 60 additions and 12 deletions
@ -0,0 +1,17 @@ |
|||
namespace CoreAgent.Domain.Models.System; |
|||
|
|||
/// <summary>
|
|||
/// 设备信息响应模型(用于API响应)
|
|||
/// </summary>
|
|||
public class DeviceInfoResponse |
|||
{ |
|||
/// <summary>
|
|||
/// 设备序列号(SN)
|
|||
/// </summary>
|
|||
public string SerialNumber { get; set; } = string.Empty; |
|||
|
|||
/// <summary>
|
|||
/// 获取时间
|
|||
/// </summary>
|
|||
public DateTime Timestamp { get; set; } = DateTime.UtcNow; |
|||
} |
Loading…
Reference in new issue