- 添加OsDevice模型和OsDevicesController - 实现WindowsScannerService用于网络扫描和WMI查询 - 添加AMT设备UUID查询功能(从CIM_ComputerSystemPackage获取PlatformGUID) - 实现PlatformGUID到标准UUID格式的转换(字节序转换) - 修复HardwareInfoRepository保存UUID的问题 - 前端添加OS设备管理页面和UUID获取/刷新按钮 - 添加数据库迁移脚本
83 lines
2.1 KiB
C#
83 lines
2.1 KiB
C#
namespace AmtScanner.Api.Models;
|
|
|
|
public class HardwareInfoDto
|
|
{
|
|
public long DeviceId { get; set; }
|
|
public string IpAddress { get; set; } = string.Empty;
|
|
public DateTime LastUpdated { get; set; }
|
|
public SystemInfoDto? SystemInfo { get; set; }
|
|
public ProcessorInfoDto? Processor { get; set; }
|
|
public MemoryInfoDto? Memory { get; set; }
|
|
public StorageInfoDto? Storage { get; set; }
|
|
}
|
|
|
|
public class SystemInfoDto
|
|
{
|
|
public string? Manufacturer { get; set; }
|
|
public string? Model { get; set; }
|
|
public string? SerialNumber { get; set; }
|
|
public string? Uuid { get; set; }
|
|
}
|
|
|
|
public class ProcessorInfoDto
|
|
{
|
|
public string? Model { get; set; }
|
|
public int? Cores { get; set; }
|
|
public int? Threads { get; set; }
|
|
public int? MaxClockSpeed { get; set; } // MHz
|
|
public int? CurrentClockSpeed { get; set; } // MHz
|
|
}
|
|
|
|
public class MemoryInfoDto
|
|
{
|
|
public long? TotalCapacity { get; set; } // bytes
|
|
public int? TotalCapacityGB { get; set; }
|
|
public List<MemoryModuleDto> Modules { get; set; } = new();
|
|
}
|
|
|
|
public class MemoryModuleDto
|
|
{
|
|
public string? Slot { get; set; }
|
|
public long? Capacity { get; set; } // bytes
|
|
public int? CapacityGB { get; set; }
|
|
public int? Speed { get; set; } // MHz
|
|
public string? Type { get; set; }
|
|
public string? Manufacturer { get; set; }
|
|
public string? PartNumber { get; set; }
|
|
public string? SerialNumber { get; set; }
|
|
}
|
|
|
|
public class StorageInfoDto
|
|
{
|
|
public List<StorageDeviceDto> Devices { get; set; } = new();
|
|
}
|
|
|
|
public class StorageDeviceDto
|
|
{
|
|
public string? DeviceId { get; set; }
|
|
public string? Model { get; set; }
|
|
public long? Capacity { get; set; } // bytes
|
|
public int? CapacityGB { get; set; }
|
|
public string? InterfaceType { get; set; }
|
|
}
|
|
|
|
public class BatchHardwareInfoRequest
|
|
{
|
|
public List<long> DeviceIds { get; set; } = new();
|
|
public bool Refresh { get; set; } = false;
|
|
}
|
|
|
|
public class BatchHardwareInfoResult
|
|
{
|
|
public long DeviceId { get; set; }
|
|
public bool Success { get; set; }
|
|
public HardwareInfoDto? Data { get; set; }
|
|
public string? Error { get; set; }
|
|
}
|
|
|
|
public enum ExportFormat
|
|
{
|
|
CSV,
|
|
JSON
|
|
}
|