1use crate::schema::SchemaMetadata;
4use std::collections::BTreeMap;
5use std::sync::Arc;
6
7#[derive(Debug, Clone)]
8pub struct ValenceEntity {
9 pub table: String,
10 pub id: String,
11 pub data: BTreeMap<String, serde_json::Value>,
12 pub hidden_fields: Vec<String>,
13 pub schema: Arc<SchemaMetadata>,
14}
15
16impl ValenceEntity {
17 pub fn new(
18 table: String,
19 id: String,
20 data: BTreeMap<String, serde_json::Value>,
21 hidden_fields: Vec<String>,
22 schema: Arc<SchemaMetadata>,
23 ) -> Self {
24 Self {
25 table,
26 id,
27 data,
28 hidden_fields,
29 schema,
30 }
31 }
32}