use std::collections::BTreeMap;
#[derive(Debug, Clone, Default, PartialEq, Eq)]
pub struct ModelSchemaOptions {
pub model_name: Option<String>,
pub field_names: BTreeMap<String, String>,
}
impl ModelSchemaOptions {
pub fn new() -> Self {
Self::default()
}
#[must_use]
pub fn model_name(mut self, name: impl Into<String>) -> Self {
self.model_name = Some(name.into());
self
}
#[must_use]
pub fn field_name(
mut self,
logical_name: impl Into<String>,
db_name: impl Into<String>,
) -> Self {
self.field_names.insert(logical_name.into(), db_name.into());
self
}
}