Macro impl_data_entity
Source macro_rules! impl_data_entity {
($type:ty, $singular:expr, [$($field:expr),*]) => { ... };
}
Expand description
Implement the Data trait for an entity
§Example
ⓘuse this::prelude::*;
#[derive(Debug, Clone, Serialize, Deserialize)]
struct User {
id: Uuid,
tenant_id: Uuid,
name: String,
email: String,
}
impl_data_entity!(User, "user", ["name", "email"]);