using System.ComponentModel.DataAnnotations; namespace AmtScanner.Api.Models; /// /// Windows 远程桌面凭据 /// public class WindowsCredential { [Key] public long Id { get; set; } /// /// 凭据名称(便于识别) /// [Required] [MaxLength(200)] public string Name { get; set; } = string.Empty; /// /// Windows 用户名 /// [Required] [MaxLength(200)] public string Username { get; set; } = string.Empty; /// /// Windows 密码(加密存储) /// [Required] [MaxLength(500)] public string Password { get; set; } = string.Empty; /// /// 域名(可选) /// [MaxLength(200)] public string? Domain { get; set; } /// /// 是否为默认凭据 /// public bool IsDefault { get; set; } = false; /// /// 备注 /// [MaxLength(500)] public string? Note { get; set; } /// /// 创建时间 /// public DateTime CreatedAt { get; set; } = DateTime.UtcNow; /// /// 更新时间 /// public DateTime UpdatedAt { get; set; } = DateTime.UtcNow; }