#[derive(Debug, Clone)]
pub struct DataScopeContext {
pub user_id: i64,
pub dept_id: i64,
pub is_super: bool,
}
impl DataScopeContext {
pub fn new(user_id: i64, dept_id: i64, is_super: bool) -> Self {
Self {
user_id,
dept_id,
is_super,
}
}
}
impl Default for DataScopeContext {
fn default() -> Self {
Self::new(0, 0, false)
}
}