fix: 边API响应增加created_at/updated_at,星图展示关系时间戳

This commit is contained in:
root
2026-04-30 09:03:48 +08:00
parent 17978cc71f
commit aa9b25c829
2 changed files with 55 additions and 2 deletions

View File

@ -808,7 +808,8 @@ def get_graph():
# 查询关系(边)
cursor.execute("""
SELECT r.id, r.source_id, r.target_id, r.relation_type, r.confidence, r.status
SELECT r.id, r.source_id, r.target_id, r.relation_type,
r.confidence, r.status, r.created_at, r.updated_at
FROM relations r
WHERE r.status = 'active'
""")
@ -821,7 +822,9 @@ def get_graph():
"target": row['target_id'],
"relation_type": row['relation_type'],
"confidence": row['confidence'],
"status": row['status']
"status": row['status'],
"created_at": row['created_at'],
"updated_at": row['updated_at']
})
return jsonify({