bug fixed
This commit is contained in:
parent
62cff75a51
commit
eac2bea1e5
17
src/models/domain.rs
Normal file
17
src/models/domain.rs
Normal file
|
@ -0,0 +1,17 @@
|
|||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct Site {
|
||||
#[prost(string, tag = "1")]
|
||||
pub id: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "2")]
|
||||
pub url: ::prost::alloc::string::String,
|
||||
#[prost(bool, tag = "3")]
|
||||
pub show: bool,
|
||||
#[prost(bool, tag = "4")]
|
||||
pub can_use: bool,
|
||||
#[prost(uint64, tag = "5")]
|
||||
pub created_at: u64,
|
||||
#[prost(uint64, tag = "6")]
|
||||
pub updated_at: u64,
|
||||
#[prost(uint64, optional, tag = "7")]
|
||||
pub deleted_at: ::core::option::Option<u64>,
|
||||
}
|
|
@ -1,3 +1,5 @@
|
|||
use crate::models::domain;
|
||||
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct MemberClass {
|
||||
#[prost(string, tag = "1")]
|
||||
|
@ -29,53 +31,38 @@ pub struct MemberLevel {
|
|||
pub deleted_at: ::core::option::Option<u64>,
|
||||
}
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct MemberSite {
|
||||
#[prost(string, tag = "1")]
|
||||
pub id: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "2")]
|
||||
pub url: ::prost::alloc::string::String,
|
||||
#[prost(uint64, tag = "3")]
|
||||
pub created_at: u64,
|
||||
#[prost(uint64, tag = "4")]
|
||||
pub updated_at: u64,
|
||||
#[prost(uint64, optional, tag = "5")]
|
||||
pub deleted_at: ::core::option::Option<u64>,
|
||||
}
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct Member {
|
||||
#[prost(string, tag = "1")]
|
||||
pub id: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "2")]
|
||||
pub domain_id: ::prost::alloc::string::String,
|
||||
#[prost(message, optional, tag = "2")]
|
||||
pub site: ::core::option::Option<domain::Site>,
|
||||
#[prost(message, optional, tag = "3")]
|
||||
pub member_class: ::core::option::Option<MemberClass>,
|
||||
#[prost(message, optional, tag = "4")]
|
||||
pub member_level: ::core::option::Option<MemberLevel>,
|
||||
#[prost(message, optional, tag = "5")]
|
||||
pub member_site: ::core::option::Option<MemberSite>,
|
||||
#[prost(message, optional, boxed, tag = "6")]
|
||||
#[prost(message, optional, boxed, tag = "5")]
|
||||
pub referrer: ::core::option::Option<::prost::alloc::boxed::Box<Member>>,
|
||||
#[prost(uint64, tag = "7")]
|
||||
#[prost(uint64, tag = "6")]
|
||||
pub referred_count: u64,
|
||||
#[prost(string, tag = "8")]
|
||||
#[prost(string, tag = "7")]
|
||||
pub username: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "9")]
|
||||
#[prost(string, tag = "8")]
|
||||
pub nickname: ::prost::alloc::string::String,
|
||||
#[prost(string, optional, tag = "10")]
|
||||
#[prost(string, optional, tag = "9")]
|
||||
pub mobile_phone_number: ::core::option::Option<::prost::alloc::string::String>,
|
||||
#[prost(enumeration = "MemberState", tag = "11")]
|
||||
#[prost(enumeration = "MemberState", tag = "10")]
|
||||
pub state: i32,
|
||||
#[prost(uint64, optional, tag = "12")]
|
||||
#[prost(uint64, optional, tag = "11")]
|
||||
pub state_changed_at: ::core::option::Option<u64>,
|
||||
#[prost(string, optional, tag = "13")]
|
||||
#[prost(string, optional, tag = "12")]
|
||||
pub last_signined_ip: ::core::option::Option<::prost::alloc::string::String>,
|
||||
#[prost(uint64, optional, tag = "14")]
|
||||
#[prost(uint64, optional, tag = "13")]
|
||||
pub last_signined_at: ::core::option::Option<u64>,
|
||||
#[prost(uint64, tag = "15")]
|
||||
#[prost(uint64, tag = "14")]
|
||||
pub created_at: u64,
|
||||
#[prost(uint64, tag = "16")]
|
||||
#[prost(uint64, tag = "15")]
|
||||
pub updated_at: u64,
|
||||
#[prost(uint64, optional, tag = "17")]
|
||||
#[prost(uint64, optional, tag = "16")]
|
||||
pub deleted_at: ::core::option::Option<u64>,
|
||||
}
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
|
||||
|
@ -89,7 +76,6 @@ pub enum MemberState {
|
|||
Blacklist = 5,
|
||||
Suspended = 6,
|
||||
}
|
||||
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct MemberSession {
|
||||
#[prost(string, tag = "1")]
|
||||
|
|
|
@ -1,2 +1,4 @@
|
|||
pub mod core;
|
||||
pub mod domain;
|
||||
pub mod member;
|
||||
pub mod rbac;
|
||||
|
|
57
src/models/rbac.rs
Normal file
57
src/models/rbac.rs
Normal file
|
@ -0,0 +1,57 @@
|
|||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct Resource {
|
||||
#[prost(string, tag = "1")]
|
||||
pub id: ::prost::alloc::string::String,
|
||||
#[prost(message, optional, boxed, tag = "2")]
|
||||
pub parent: ::core::option::Option<::prost::alloc::boxed::Box<Resource>>,
|
||||
#[prost(string, tag = "3")]
|
||||
pub name: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "4")]
|
||||
pub key: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "5")]
|
||||
pub description: ::prost::alloc::string::String,
|
||||
#[prost(bool, tag = "6")]
|
||||
pub can_use: bool,
|
||||
#[prost(uint64, tag = "7")]
|
||||
pub created_at: u64,
|
||||
#[prost(uint64, tag = "8")]
|
||||
pub updated_at: u64,
|
||||
}
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct ResourceAction {
|
||||
#[prost(string, tag = "1")]
|
||||
pub id: ::prost::alloc::string::String,
|
||||
#[prost(message, optional, tag = "2")]
|
||||
pub resource: ::core::option::Option<Resource>,
|
||||
#[prost(string, tag = "3")]
|
||||
pub name: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "4")]
|
||||
pub key: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "5")]
|
||||
pub description: ::prost::alloc::string::String,
|
||||
#[prost(bool, tag = "6")]
|
||||
pub can_use: bool,
|
||||
#[prost(uint64, tag = "7")]
|
||||
pub created_at: u64,
|
||||
#[prost(uint64, tag = "8")]
|
||||
pub updated_at: u64,
|
||||
}
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct Role {
|
||||
#[prost(string, tag = "1")]
|
||||
pub id: ::prost::alloc::string::String,
|
||||
#[prost(message, optional, boxed, tag = "2")]
|
||||
pub parent: ::core::option::Option<::prost::alloc::boxed::Box<Role>>,
|
||||
#[prost(string, tag = "3")]
|
||||
pub name: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "4")]
|
||||
pub key: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "5")]
|
||||
pub description: ::prost::alloc::string::String,
|
||||
#[prost(bool, tag = "6")]
|
||||
pub can_use: bool,
|
||||
#[prost(uint64, tag = "7")]
|
||||
pub created_at: u64,
|
||||
#[prost(uint64, tag = "8")]
|
||||
pub updated_at: u64,
|
||||
}
|
Loading…
Reference in New Issue
Block a user