use super::schema::{data, meta}; use chrono::NaiveDateTime; use serde::Serialize; #[derive(Queryable, Insertable, Serialize, Debug)] #[table_name = "data"] pub struct Entry { pub identity: Vec, pub entity: Vec, pub entity_searchable: Option, pub attribute: String, pub value_str: Option, pub value_num: Option, pub immutable: bool, pub provenance: String, pub timestamp: NaiveDateTime, } #[derive(Queryable, Insertable, Serialize, Clone, Debug)] #[table_name = "meta"] pub struct MetaValue { pub id: i32, pub key: String, pub value: String, }