Files
knowledge-graph-agent/backend/models/nodes.go
T

24 lines
601 B
Go
Raw Normal View History

2026-04-05 15:03:56 +08:00
package models
type NodeResponse struct {
ID string `json:"id" example:"1"`
Label string `json:"label" example:"人工智能"`
Type string `json:"type,omitempty" example:"概念"`
Properties map[string]interface{} `json:"properties,omitempty"`
}
type NeighborResponse struct {
Nodes []Node `json:"nodes"`
Edges []Edge `json:"edges"`
}
type SearchResponse struct {
Results []Node `json:"results"`
Count int `json:"count"`
}
type ErrorResponse struct {
Error string `json:"error"`
Message string `json:"message"`
}