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 #[must_use]
18 pub fn new(
19 table: String,
20 id: String,
21 data: BTreeMap<String, serde_json::Value>,
22 hidden_fields: Vec<String>,
23 schema: Arc<SchemaMetadata>,
24 ) -> Self {
25 Self {
26 table,
27 id,
28 data,
29 hidden_fields,
30 schema,
31 }
32 }
33}