-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathKnowledgeSyncModels.cs
More file actions
47 lines (42 loc) · 1.67 KB
/
KnowledgeSyncModels.cs
File metadata and controls
47 lines (42 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
using System;
using System.Collections.Generic;
namespace TimeTask
{
public sealed class ObsidianNote
{
public string RelativePath { get; set; }
public string Title { get; set; }
public string Content { get; set; }
public DateTime LastWriteTimeUtc { get; set; }
public string Signature { get; set; }
}
public sealed class ExtractedTaskCandidate
{
public string Title { get; set; }
public string Priority { get; set; }
public DateTime? DueAt { get; set; }
public double Confidence { get; set; }
public string SourcePath { get; set; }
public string EvidenceLine { get; set; }
}
public sealed class KnowledgeSyncResult
{
public int NotesScanned { get; set; }
public int TaskCandidates { get; set; }
public int DraftsAdded { get; set; }
public int AutoImported { get; set; }
public int DuplicatesSkipped { get; set; }
public int FailedNotes { get; set; }
public List<TaskDraft> NewDrafts { get; } = new List<TaskDraft>();
public List<string> Errors { get; } = new List<string>();
public string BuildSummaryText()
{
return $"扫描笔记 {NotesScanned},提取候选任务 {TaskCandidates},新增草稿 {DraftsAdded},自动入象限 {AutoImported},跳过重复 {DuplicatesSkipped},失败 {FailedNotes}";
}
}
public sealed class KnowledgeSyncState
{
public DateTime LastRunUtc { get; set; } = DateTime.MinValue;
public Dictionary<string, string> NoteSignatures { get; set; } = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
}
}