From a5c01a3f115399b55f43d639c8278b8d68c6211c Mon Sep 17 00:00:00 2001
From: ax_rd <ax_rd@aisim.cn>
Date: Thu, 03 Sep 2026 11:26:53 +0800
Subject: [PATCH] feat: wikilink 边可信度标注(exact/fuzzy)+ 悬空链接入 unresolved_links 表

---
 internal/graph/model.go |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/internal/graph/model.go b/internal/graph/model.go
index 485cc6e..06a70c2 100644
--- a/internal/graph/model.go
+++ b/internal/graph/model.go
@@ -21,9 +21,16 @@
 type Edge struct {
 	FromNode   int64  `json:"from_node"`
 	ToNode     int64  `json:"to_node"` // 对于 tag/entity 边,ToNode 可以是虚拟节点 ID
-	Relation   string `json:"relation"` // "tag" | "entity" | "wikilink"
-	Label      string `json:"label"`    // 具体值
-	Provenance string `json:"provenance"`
+	Relation   string `json:"relation"`   // "tag" | "entity" | "wikilink"
+	Label      string `json:"label"`      // 具体值
+	Provenance string `json:"provenance"` // "exact" | "fuzzy" | "tag" | "entity"
+}
+
+// UnresolvedLink 悬空 wikilink(未匹配到目标节点)
+type UnresolvedLink struct {
+	FromNode int64 // BuildGraph 内部节点 ID
+	LinkText string
+	NameTail string
 }
 
 // Graph 知识图谱

--
Gitblit v1.10.0