bios_iam/basic/domain/
iam_res.rs

1use tardis::db::sea_orm;
2use tardis::db::sea_orm::*;
3use tardis::{TardisCreateEntity, TardisEmptyBehavior, TardisEmptyRelation};
4
5#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, TardisCreateEntity, TardisEmptyBehavior, TardisEmptyRelation)]
6#[sea_orm(table_name = "iam_res")]
7pub struct Model {
8    #[sea_orm(primary_key, auto_increment = false)]
9    pub id: String,
10    #[index]
11    pub kind: i16,
12    pub icon: String,
13    pub sort: i64,
14    // 资源方法 例如:*、GET、POST、PUT、DELETE
15    pub method: String,
16    // 是否隐藏
17    pub hide: bool,
18    // 资源动作 例如:*、list、create、update、delete
19    pub action: String,
20    // Whether request is encrypted or not / 请求是否加密
21    pub crypto_req: bool,
22    // Whether response is encrypted or not / 响应是否加密
23    pub crypto_resp: bool,
24    // Is secondary certification required / 是否需要二次认证
25    pub double_auth: bool,
26    /// Secondary Authentication Message / 二次认证消息
27    pub double_auth_msg: String,
28    // 是否需要验证登陆
29    pub need_login: bool,
30
31    pub ext: String,
32
33    #[fill_ctx(fill = "own_paths")]
34    pub own_paths: String,
35}