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:
17
PersonalToolBox/Models/Category.cs
Normal file
17
PersonalToolBox/Models/Category.cs
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user