lvfengfree eebbacafde feat: 实现OS设备扫描和UUID绑定功能
- 添加OsDevice模型和OsDevicesController
- 实现WindowsScannerService用于网络扫描和WMI查询
- 添加AMT设备UUID查询功能(从CIM_ComputerSystemPackage获取PlatformGUID)
- 实现PlatformGUID到标准UUID格式的转换(字节序转换)
- 修复HardwareInfoRepository保存UUID的问题
- 前端添加OS设备管理页面和UUID获取/刷新按钮
- 添加数据库迁移脚本
2026-01-21 16:16:48 +08:00

60 lines
1.3 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System.ComponentModel.DataAnnotations;
namespace AmtScanner.Api.Models;
public class AmtDevice
{
[Key]
public long Id { get; set; }
[Required]
public string IpAddress { get; set; } = string.Empty;
public string? Hostname { get; set; }
/// <summary>
/// 系统 UUIDSMBIOS UUID用于与操作系统绑定
/// </summary>
public string? SystemUuid { get; set; }
public int MajorVersion { get; set; }
public int MinorVersion { get; set; }
public ProvisioningState ProvisioningState { get; set; }
public string? Description { get; set; }
/// <summary>
/// AMT 在线状态(端口是否可访问)
/// </summary>
public bool AmtOnline { get; set; }
/// <summary>
/// 操作系统在线状态(电源状态是否为开机)
/// </summary>
public bool OsOnline { get; set; }
/// <summary>
/// Windows 登录用户名
/// </summary>
public string? WindowsUsername { get; set; }
/// <summary>
/// Windows 登录密码(加密存储)
/// </summary>
public string? WindowsPassword { get; set; }
public DateTime DiscoveredAt { get; set; }
public DateTime LastSeenAt { get; set; }
}
public enum ProvisioningState
{
UNKNOWN,
PRE,
IN,
POST
}