// // role.rs // Copyright (C) 2022 veypi // 2022-07-09 02:42 // Distributed under terms of the Apache license. // use rbatis::{crud_table, DateTimeNative}; #[crud_table] #[derive(Debug, Clone, Default)] pub struct Role { pub id: String, pub created: Option, pub updated: Option, pub delete_flag: bool, pub app_id: String, pub name: Option, pub des: Option, pub user_count: usize, } #[crud_table] #[derive(Debug, Clone, Default)] pub struct Resource { pub created: Option, pub updated: Option, pub delete_flag: bool, pub app_id: String, pub name: String, pub des: Option, } #[crud_table] #[derive(Debug, Clone, Default)] pub struct Access { pub created: Option, pub updated: Option, pub delete_flag: bool, pub app_id: String, pub name: String, pub role_id: Option, pub user_id: Option, pub rid: Option, pub level: usize, }