storing relationships

This commit is contained in:
Per Stark
2024-11-04 20:58:08 +01:00
parent 2acd00ff8e
commit 40cf2e3b5b
3 changed files with 32 additions and 14 deletions

View File

@@ -40,11 +40,11 @@ impl From<String> for KnowledgeEntityType {
/// Represents a relationship between two knowledge entities.
#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct KnowledgeRelationship {
pub id: Uuid, // Generated in Rust
pub id: String,
#[serde(rename = "in")]
pub in_: Uuid, // Target KnowledgeEntity ID
pub out: Uuid, // Source KnowledgeEntity ID
pub relationship_type: String, // e.g., RelatedTo, RelevantTo
pub in_: String, // Target KnowledgeEntity ID
pub out: String, // Source KnowledgeEntity ID
pub relationship_type: String, // e.g., RelatedTo, RelevantTo
pub metadata: Option<serde_json::Value>, // Additional metadata
}