refactoring
This commit is contained in:
parent
64c2dd0164
commit
cc13112acc
|
@ -1,5 +1,6 @@
|
|||
use crate::protobuf::pagination;
|
||||
use crate::protobuf::rpc;
|
||||
use crate::models::member;
|
||||
|
||||
const SUBJECT: &str = "bet.beteran.c2se.backend.member";
|
||||
|
||||
|
@ -13,6 +14,26 @@ pub struct ListMembersRequest {
|
|||
pub searches: ::prost::alloc::vec::Vec<pagination::Search>,
|
||||
#[prost(message, repeated, tag = "3")]
|
||||
pub sorts: ::prost::alloc::vec::Vec<pagination::Sort>,
|
||||
#[prost(string, optional, tag="4")]
|
||||
pub site_id: ::core::option::Option<::prost::alloc::string::String>,
|
||||
#[prost(string, optional, tag="5")]
|
||||
pub member_class_id: ::core::option::Option<::prost::alloc::string::String>,
|
||||
#[prost(string, optional, tag="6")]
|
||||
pub member_level_id: ::core::option::Option<::prost::alloc::string::String>,
|
||||
#[prost(string, optional, tag="7")]
|
||||
pub referrer_member_id: ::core::option::Option<::prost::alloc::string::String>,
|
||||
#[prost(string, optional, tag="8")]
|
||||
pub username_like: ::core::option::Option<::prost::alloc::string::String>,
|
||||
#[prost(string, optional, tag="9")]
|
||||
pub nickname_like: ::core::option::Option<::prost::alloc::string::String>,
|
||||
#[prost(string, optional, tag="10")]
|
||||
pub mobile_phone_number_like: ::core::option::Option<::prost::alloc::string::String>,
|
||||
#[prost(string, optional, tag="11")]
|
||||
pub last_signined_ip: ::core::option::Option<::prost::alloc::string::String>,
|
||||
#[prost(enumeration="member::MemberState", optional, tag="12")]
|
||||
pub state: ::core::option::Option<i32>,
|
||||
#[prost(uint64, optional, tag="13")]
|
||||
pub deleted_at: ::core::option::Option<u64>,
|
||||
}
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct ListMembersResponse {
|
||||
|
@ -28,7 +49,7 @@ pub mod list_members_response {
|
|||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct Result {
|
||||
#[prost(message, repeated, tag = "1")]
|
||||
pub members: ::prost::alloc::vec::Vec<member::Member>,
|
||||
pub members: ::prost::alloc::vec::Vec<member::MemberModel>,
|
||||
}
|
||||
}
|
||||
pub const SUBJECT_GET_MEMBER: &str = const_format::concatcp!(SUBJECT, ".GetMember");
|
||||
|
@ -51,7 +72,7 @@ pub mod get_member_response {
|
|||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct Result {
|
||||
#[prost(message, optional, tag = "1")]
|
||||
pub member: ::core::option::Option<member::Member>,
|
||||
pub member: ::core::option::Option<member::MemberModel>,
|
||||
}
|
||||
}
|
||||
pub const SUBJECT_GET_MEMBER_BY_USERNAME: &str =
|
||||
|
@ -75,6 +96,6 @@ pub mod get_member_by_username_response {
|
|||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct Result {
|
||||
#[prost(message, optional, tag = "1")]
|
||||
pub member: ::core::option::Option<member::Member>,
|
||||
pub member: ::core::option::Option<member::MemberModel>,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,6 +13,18 @@ pub struct ListSitesRequest {
|
|||
pub searches: ::prost::alloc::vec::Vec<pagination::Search>,
|
||||
#[prost(message, repeated, tag = "3")]
|
||||
pub sorts: ::prost::alloc::vec::Vec<pagination::Sort>,
|
||||
#[prost(string, optional, tag="4")]
|
||||
pub url_like: ::core::option::Option<::prost::alloc::string::String>,
|
||||
#[prost(string, optional, tag="5")]
|
||||
pub name_like: ::core::option::Option<::prost::alloc::string::String>,
|
||||
#[prost(string, optional, tag="6")]
|
||||
pub path_like: ::core::option::Option<::prost::alloc::string::String>,
|
||||
#[prost(bool, optional, tag="7")]
|
||||
pub show: ::core::option::Option<bool>,
|
||||
#[prost(bool, optional, tag="8")]
|
||||
pub can_use: ::core::option::Option<bool>,
|
||||
#[prost(string, optional, tag="9")]
|
||||
pub memo_like: ::core::option::Option<::prost::alloc::string::String>,
|
||||
}
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct ListSitesResponse {
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
use crate::models::domain;
|
||||
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct MemberClass {
|
||||
#[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<MemberClass>>,
|
||||
#[prost(string, optional, tag="2")]
|
||||
pub parent_id: ::core::option::Option<::prost::alloc::string::String>,
|
||||
#[prost(string, tag = "3")]
|
||||
pub name: ::prost::alloc::string::String,
|
||||
#[prost(uint64, tag = "4")]
|
||||
|
@ -21,8 +19,8 @@ pub struct MemberLevel {
|
|||
pub id: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "2")]
|
||||
pub name: ::prost::alloc::string::String,
|
||||
#[prost(uint32, tag = "3")]
|
||||
pub order: u32,
|
||||
#[prost(uint32, tag="3")]
|
||||
pub sort_order: u32,
|
||||
#[prost(uint64, tag = "4")]
|
||||
pub created_at: u64,
|
||||
#[prost(uint64, tag = "5")]
|
||||
|
@ -32,37 +30,72 @@ pub struct MemberLevel {
|
|||
}
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct Member {
|
||||
#[prost(string, tag = "1")]
|
||||
#[prost(string, tag="1")]
|
||||
pub 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, boxed, tag = "5")]
|
||||
pub referrer_member: ::core::option::Option<::prost::alloc::boxed::Box<Member>>,
|
||||
#[prost(uint64, tag = "6")]
|
||||
#[prost(string, tag="2")]
|
||||
pub site_id: ::prost::alloc::string::String,
|
||||
#[prost(string, tag="3")]
|
||||
pub member_class_id: ::prost::alloc::string::String,
|
||||
#[prost(string, tag="4")]
|
||||
pub member_level_id: ::prost::alloc::string::String,
|
||||
#[prost(string, optional, tag="5")]
|
||||
pub referrer_member_id: ::core::option::Option<::prost::alloc::string::String>,
|
||||
#[prost(uint64, tag="6")]
|
||||
pub referred_count: u64,
|
||||
#[prost(string, tag = "7")]
|
||||
#[prost(string, tag="7")]
|
||||
pub username: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "8")]
|
||||
#[prost(string, tag="8")]
|
||||
pub nickname: ::prost::alloc::string::String,
|
||||
#[prost(string, optional, tag = "9")]
|
||||
#[prost(string, optional, tag="9")]
|
||||
pub mobile_phone_number: ::core::option::Option<::prost::alloc::string::String>,
|
||||
#[prost(enumeration = "MemberState", tag = "10")]
|
||||
#[prost(enumeration="MemberState", tag="10")]
|
||||
pub state: i32,
|
||||
#[prost(uint64, optional, tag = "11")]
|
||||
#[prost(uint64, optional, tag="11")]
|
||||
pub state_changed_at: ::core::option::Option<u64>,
|
||||
#[prost(string, optional, tag = "12")]
|
||||
#[prost(string, optional, tag="12")]
|
||||
pub last_signined_ip: ::core::option::Option<::prost::alloc::string::String>,
|
||||
#[prost(uint64, optional, tag = "13")]
|
||||
#[prost(uint64, optional, tag="13")]
|
||||
pub last_signined_at: ::core::option::Option<u64>,
|
||||
#[prost(uint64, tag = "14")]
|
||||
#[prost(uint64, tag="14")]
|
||||
pub created_at: u64,
|
||||
#[prost(uint64, tag = "15")]
|
||||
#[prost(uint64, tag="15")]
|
||||
pub updated_at: u64,
|
||||
#[prost(uint64, optional, tag = "16")]
|
||||
#[prost(uint64, optional, tag="16")]
|
||||
pub deleted_at: ::core::option::Option<u64>,
|
||||
}
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct MemberModel {
|
||||
#[prost(string, tag="1")]
|
||||
pub id: ::prost::alloc::string::String,
|
||||
#[prost(message, optional, tag="2")]
|
||||
pub site: ::core::option::Option<super::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 referrer_member: ::core::option::Option<Member>,
|
||||
#[prost(uint64, tag="6")]
|
||||
pub referred_count: u64,
|
||||
#[prost(string, tag="7")]
|
||||
pub username: ::prost::alloc::string::String,
|
||||
#[prost(string, tag="8")]
|
||||
pub nickname: ::prost::alloc::string::String,
|
||||
#[prost(string, optional, tag="9")]
|
||||
pub mobile_phone_number: ::core::option::Option<::prost::alloc::string::String>,
|
||||
#[prost(enumeration="MemberState", tag="10")]
|
||||
pub state: i32,
|
||||
#[prost(uint64, optional, tag="11")]
|
||||
pub state_changed_at: ::core::option::Option<u64>,
|
||||
#[prost(string, optional, tag="12")]
|
||||
pub last_signined_ip: ::core::option::Option<::prost::alloc::string::String>,
|
||||
#[prost(uint64, optional, tag="13")]
|
||||
pub last_signined_at: ::core::option::Option<u64>,
|
||||
#[prost(uint64, tag="14")]
|
||||
pub created_at: u64,
|
||||
#[prost(uint64, tag="15")]
|
||||
pub updated_at: u64,
|
||||
#[prost(uint64, optional, tag="16")]
|
||||
pub deleted_at: ::core::option::Option<u64>,
|
||||
}
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
|
||||
|
|
|
@ -16,6 +16,18 @@ pub struct ListSitesRequest {
|
|||
pub searches: ::prost::alloc::vec::Vec<pagination::Search>,
|
||||
#[prost(message, repeated, tag="4")]
|
||||
pub sorts: ::prost::alloc::vec::Vec<pagination::Sort>,
|
||||
#[prost(string, optional, tag="5")]
|
||||
pub url_like: ::core::option::Option<::prost::alloc::string::String>,
|
||||
#[prost(string, optional, tag="6")]
|
||||
pub name_like: ::core::option::Option<::prost::alloc::string::String>,
|
||||
#[prost(string, optional, tag="7")]
|
||||
pub path_like: ::core::option::Option<::prost::alloc::string::String>,
|
||||
#[prost(bool, optional, tag="8")]
|
||||
pub show: ::core::option::Option<bool>,
|
||||
#[prost(bool, optional, tag="9")]
|
||||
pub can_use: ::core::option::Option<bool>,
|
||||
#[prost(string, optional, tag="10")]
|
||||
pub memo_like: ::core::option::Option<::prost::alloc::string::String>,
|
||||
}
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct ListSitesResponse {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
use crate::models::core;
|
||||
use crate::protobuf::rpc;
|
||||
use crate::protobuf::pagination;
|
||||
use crate::models::member;
|
||||
|
||||
const SUBJECT: &str = "bet.beteran.ss.member";
|
||||
|
||||
|
@ -17,6 +18,26 @@ pub struct ListMembersRequest {
|
|||
pub searches: ::prost::alloc::vec::Vec<pagination::Search>,
|
||||
#[prost(message, repeated, tag="4")]
|
||||
pub sorts: ::prost::alloc::vec::Vec<pagination::Sort>,
|
||||
#[prost(string, optional, tag="5")]
|
||||
pub site_id: ::core::option::Option<::prost::alloc::string::String>,
|
||||
#[prost(string, optional, tag="6")]
|
||||
pub member_class_id: ::core::option::Option<::prost::alloc::string::String>,
|
||||
#[prost(string, optional, tag="7")]
|
||||
pub member_level_id: ::core::option::Option<::prost::alloc::string::String>,
|
||||
#[prost(string, optional, tag="8")]
|
||||
pub referrer_member_id: ::core::option::Option<::prost::alloc::string::String>,
|
||||
#[prost(string, optional, tag="9")]
|
||||
pub username_like: ::core::option::Option<::prost::alloc::string::String>,
|
||||
#[prost(string, optional, tag="10")]
|
||||
pub nickname_like: ::core::option::Option<::prost::alloc::string::String>,
|
||||
#[prost(string, optional, tag="11")]
|
||||
pub mobile_phone_number_like: ::core::option::Option<::prost::alloc::string::String>,
|
||||
#[prost(string, optional, tag="12")]
|
||||
pub last_signined_ip: ::core::option::Option<::prost::alloc::string::String>,
|
||||
#[prost(enumeration="member::MemberState", optional, tag="13")]
|
||||
pub state: ::core::option::Option<i32>,
|
||||
#[prost(uint64, optional, tag="14")]
|
||||
pub deleted_at: ::core::option::Option<u64>,
|
||||
}
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct ListMembersResponse {
|
||||
|
@ -32,7 +53,7 @@ pub mod list_members_response {
|
|||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct Result {
|
||||
#[prost(message, repeated, tag="1")]
|
||||
pub members: ::prost::alloc::vec::Vec<member::Member>,
|
||||
pub members: ::prost::alloc::vec::Vec<member::MemberModel>,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -59,7 +80,7 @@ pub mod get_member_response {
|
|||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct Result {
|
||||
#[prost(message, optional, tag="1")]
|
||||
pub member: ::core::option::Option<member::Member>,
|
||||
pub member: ::core::option::Option<member::MemberModel>,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -87,6 +108,6 @@ pub mod get_member_by_username_response {
|
|||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct Result {
|
||||
#[prost(message, optional, tag="1")]
|
||||
pub member: ::core::option::Option<member::Member>,
|
||||
pub member: ::core::option::Option<member::MemberModel>,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user