Phase 1: data models and local storage service

- Add Models: Category, ToolItem (IsValid runtime-only, not stored), AppConfig

- Add Services: IDataService + JsonDataService (JSON load/save)

- Path validation on Load(): File.Exists check, logs warning for missing paths

- Startup: auto-calls dataService.Load() to load config
This commit is contained in:
2026-05-09 20:34:36 +08:00
parent 875e331116
commit 752f09a7e4
6 changed files with 222 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
namespace PersonalToolBox.Models;
/// <summary>
/// 工具标签页分类
/// </summary>
public class Category
{
/// <summary>
/// 分类唯一标识
/// </summary>
public string Id { get; set; } = Guid.NewGuid().ToString();
/// <summary>
/// 分类显示名称(如:开发工具、常用脚本)
/// </summary>
public string Name { get; set; } = string.Empty;
}