using System.Text.Json.Serialization; namespace PersonalToolBox.Models; /// /// 工具项模型,表示用户添加的一个可执行工具 /// public class ToolItem { /// /// 工具唯一标识 (UUID) /// public string Id { get; set; } = Guid.NewGuid().ToString(); /// /// 工具显示名称 /// public string Name { get; set; } = string.Empty; /// /// 内置图标库的字符编码 /// public string IconCode { get; set; } = string.Empty; /// /// 可执行文件路径或 URL /// public string ExecutablePath { get; set; } = string.Empty; /// /// 运行参数(选填) /// public string Arguments { get; set; } = string.Empty; /// /// 所属分类 ID /// public string CategoryId { get; set; } = string.Empty; /// /// 全局快捷键(如 Ctrl+Alt+T),选填 /// public string HotKey { get; set; } = string.Empty; /// /// 路径是否有效(仅运行时计算,不存入 JSON) /// [JsonIgnore] public bool IsValid { get; set; } = true; }