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
+1
View File
@@ -0,0 +1 @@
+1
View File
@@ -0,0 +1 @@
+4
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;
+1
View File
@@ -0,0 +1 @@
+7
View File
@@ -0,0 +1,7 @@
use crate::*;
#[derive(Debug, PartialEq, Clone)]
pub struct O {
pub id: String,
pub value: Value,
}
+7
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>,
}
+3
View File
@@ -0,0 +1,3 @@
pub mod attribute;
pub mod entity;
pub mod value;
+10
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),
}
+1
View File
@@ -0,0 +1 @@
+1
View File
@@ -0,0 +1 @@