wip graph impl

This commit is contained in:
Per Stark
2024-10-17 08:24:58 +02:00
parent 6af463ed44
commit ceb0147213
2 changed files with 15 additions and 3 deletions

View File

@@ -27,13 +27,15 @@ pub struct TextContent {
}
```
We create KnowledgeSource, which we will store
We create KnowledgeSource, which we will store as a node, and its relationship as edges
- Add a uuid to we can link the textcontent and files to the knowledge sources?
- Rename id to name, and use it as the id? Id represents the TextContent link, from which several knowledgeentities can be gathered.
```
pub struct KnowledgeSource {
pub id: String,
pub name: String,
pub id: Uuid,
pub title: String,
pub description: String,
pub relationships: Vec<Relationship>,

View File

@@ -14,10 +14,20 @@ pub struct TextContent {
pub category: String,
}
/// Represents a generic knowledge entity in the graph.
#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct KnowledgeEntity {
pub id: Uuid,
pub name: String,
pub description: String,
pub source_uuid: Uuid,
pub entity_type: String,
}
/// A struct representing a knowledge source in the graph database.
#[derive(Deserialize, Debug, Serialize, Clone )]
pub struct KnowledgeSource {
pub id: String,
pub id: Uuid,
pub title: String,
pub description: String,
pub relationships: Vec<Relationship>,