-
Notifications
You must be signed in to change notification settings - Fork 1
/
mod.rs
27 lines (23 loc) · 854 Bytes
/
mod.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
use crate::error::Result;
use async_trait::async_trait;
/// 部门管理
#[async_trait]
pub trait DepartmentManager {
/// 创建部门
async fn department_create(&self, params: ParamsCreateDepartment) -> Result<()>;
/// 更新部门
async fn department_update(&self, params: ParamsUpdateDepartment) -> Result<()>;
/// 删除部门
async fn department_delete(&self, id: u64) -> Result<()>;
/// 获取部门列表
async fn department_list(&self, id: Option<u64>) -> Result<DepartmentList<Vec<Department>>>;
/// 获取子部门ID列表
async fn department_sample_list(&self, id: Option<u64>) -> Result<DepartmentSimpleList>;
/// 获取单个部门详情
async fn department_get(&self, id: u64) -> Result<DepartmentList<Department>>;
}
mod department;
mod dto;
pub use dto::*;
mod model;
pub use model::*;