feat: add basic structures for EAV modeling (entity, attribute, value)

This commit is contained in:
2025-09-27 07:26:41 +02:00
parent 7a301eb5d7
commit 58641d7197
10 changed files with 36 additions and 0 deletions

View File

@@ -0,0 +1 @@

View File

@@ -0,0 +1 @@

View File

@@ -6,3 +6,7 @@ mod mcr;
mod str;
mod trt;
mod tst;
pub use crate::str::attribute::O as Attribute;
pub use crate::str::entity::O as Entity;
pub use crate::str::value::E as Value;

View File

@@ -0,0 +1 @@

View File

@@ -0,0 +1,7 @@
use crate::*;
#[derive(Debug, PartialEq, Clone)]
pub struct O {
pub id: String,
pub value: Value,
}

View File

@@ -0,0 +1,7 @@
use crate::*;
#[derive(Debug, Default, PartialEq, Clone)]
pub struct O {
pub class: String,
pub attributes: std::collections::HashMap<String, Attribute>,
}

View File

@@ -0,0 +1,3 @@
pub mod attribute;
pub mod entity;
pub mod value;

View File

@@ -0,0 +1,10 @@
use crate::*;
#[derive(Debug, PartialEq, PartialOrd, Clone)]
pub enum E {
Bool(bool),
Real(f64),
SignedInt(i64),
Text(String),
UnsignedInt(u64),
}

View File

@@ -0,0 +1 @@

View File

@@ -0,0 +1 @@