//! 字典服务
use indexmap::IndexMap;
use crate::tina::{data::AppResult, server::session::Session};
/// 字典服务
#[async_trait]
pub trait IDictService: Send + Sync + 'static {
/// 根据字典类型查询字典数据
async fn get_dict_data_mapping_by_keys(
&self,
session: &Session,
dict_type: &str,
dict_keys: &[&str],
) -> AppResult<IndexMap<String, String>>;
/// 根据字典类型查询字典数据
async fn get_dict_data_mapping_by_types(
&self,
session: &Session,
dict_types: &[&str],
) -> AppResult<IndexMap<String, IndexMap<String, String>>>;
}