From 6f3ab84a9b1983871420c15126b955c85b2b8d0d Mon Sep 17 00:00:00 2001 From: PARK BYUNG JUN Date: Sat, 13 Aug 2022 19:02:21 +0000 Subject: [PATCH] refactoring --- src/c2se/backend/{account.rs => bank.rs} | 9 +- src/c2se/backend/identity.rs | 35 --- src/c2se/backend/member.rs | 192 -------------- src/c2se/backend/member_bank_account.rs | 7 + src/c2se/backend/member_bank_deposit.rs | 8 + src/c2se/backend/member_bank_withdraw.rs | 8 + src/c2se/backend/member_class.rs | 131 +--------- src/c2se/backend/member_level.rs | 130 +--------- src/c2se/backend/mod.rs | 7 +- src/c2se/backend/site.rs | 139 +--------- src/{ss/account => c2se}/bank.rs | 113 ++++---- src/c2se/common/bank.rs | 130 ---------- src/c2se/common/identity.rs | 71 ----- src/c2se/common/mod.rs | 2 - src/c2se/core/network.rs | 3 - src/c2se/frontend/account.rs | 7 - src/c2se/frontend/bank.rs | 4 + src/c2se/frontend/identity.rs | 35 --- src/c2se/frontend/mod.rs | 8 + src/c2se/identity.rs | 86 +++++++ src/{ss/member => c2se}/member.rs | 190 ++++++-------- src/c2se/member_bank_account.rs | 134 ++++++++++ src/c2se/member_bank_deposit.rs | 150 +++++++++++ src/c2se/member_bank_withdraw.rs | 166 ++++++++++++ src/{ss/member => c2se}/member_class.rs | 191 ++++++-------- src/{ss/member => c2se}/member_level.rs | 191 ++++++-------- src/c2se/mod.rs | 20 +- src/{ss/domain => c2se}/site.rs | 176 ++++++------- src/lib.rs | 1 - src/models/{account.rs => bank.rs} | 10 +- src/models/core/network.rs | 16 +- src/models/member.rs | 61 +---- src/models/member_bank_account.rs | 19 ++ src/models/member_bank_deposit.rs | 28 ++ src/models/member_bank_withdraw.rs | 34 +++ src/models/member_class.rs | 13 + src/models/member_level.rs | 13 + src/models/member_permission.rs | 0 src/models/member_role.rs | 0 src/models/member_session.rs | 15 ++ src/models/mod.rs | 16 +- src/models/rbac.rs | 57 ----- src/models/resource.rs | 19 ++ src/models/resource_action.rs | 19 ++ src/models/role.rs | 19 ++ src/models/{domain.rs => site.rs} | 0 src/protobuf/mod.rs | 2 +- src/protobuf/pagination.rs | 7 - src/protobuf/rpc.rs | 313 ++++++++++++----------- src/se2c/event_message_attach_files.rs | 48 ---- src/se2c/event_messages.rs | 53 ---- src/se2c/mod.rs | 12 - src/ss/account/mod.rs | 1 - src/ss/bank.rs | 198 ++++++++++++++ src/ss/domain/mod.rs | 1 - src/ss/identity.rs | 156 +++++++++++ src/ss/member.rs | 282 ++++++++++++++++++++ src/ss/member/identity.rs | 122 --------- src/ss/member/mod.rs | 4 - src/ss/member_bank_account.rs | 197 ++++++++++++++ src/ss/member_bank_deposit.rs | 226 ++++++++++++++++ src/ss/member_bank_withdraw.rs | 242 ++++++++++++++++++ src/ss/member_class.rs | 180 +++++++++++++ src/ss/member_level.rs | 180 +++++++++++++ src/ss/mod.rs | 15 +- src/ss/site.rs | 210 +++++++++++++++ 66 files changed, 3230 insertions(+), 1902 deletions(-) rename src/c2se/backend/{account.rs => bank.rs} (55%) create mode 100644 src/c2se/backend/member_bank_account.rs create mode 100644 src/c2se/backend/member_bank_deposit.rs create mode 100644 src/c2se/backend/member_bank_withdraw.rs rename src/{ss/account => c2se}/bank.rs (53%) delete mode 100644 src/c2se/common/bank.rs delete mode 100644 src/c2se/common/identity.rs delete mode 100644 src/c2se/common/mod.rs delete mode 100644 src/c2se/frontend/account.rs create mode 100644 src/c2se/frontend/bank.rs create mode 100644 src/c2se/identity.rs rename src/{ss/member => c2se}/member.rs (50%) create mode 100644 src/c2se/member_bank_account.rs create mode 100644 src/c2se/member_bank_deposit.rs create mode 100644 src/c2se/member_bank_withdraw.rs rename src/{ss/member => c2se}/member_class.rs (51%) rename src/{ss/member => c2se}/member_level.rs (50%) rename src/{ss/domain => c2se}/site.rs (52%) rename src/models/{account.rs => bank.rs} (78%) create mode 100644 src/models/member_bank_account.rs create mode 100644 src/models/member_bank_deposit.rs create mode 100644 src/models/member_bank_withdraw.rs create mode 100644 src/models/member_class.rs create mode 100644 src/models/member_level.rs create mode 100644 src/models/member_permission.rs create mode 100644 src/models/member_role.rs create mode 100644 src/models/member_session.rs delete mode 100644 src/models/rbac.rs create mode 100644 src/models/resource.rs create mode 100644 src/models/resource_action.rs create mode 100644 src/models/role.rs rename src/models/{domain.rs => site.rs} (100%) delete mode 100644 src/se2c/event_message_attach_files.rs delete mode 100644 src/se2c/event_messages.rs delete mode 100644 src/se2c/mod.rs delete mode 100644 src/ss/account/mod.rs create mode 100644 src/ss/bank.rs delete mode 100644 src/ss/domain/mod.rs create mode 100644 src/ss/identity.rs create mode 100644 src/ss/member.rs delete mode 100644 src/ss/member/identity.rs delete mode 100644 src/ss/member/mod.rs create mode 100644 src/ss/member_bank_account.rs create mode 100644 src/ss/member_bank_deposit.rs create mode 100644 src/ss/member_bank_withdraw.rs create mode 100644 src/ss/member_class.rs create mode 100644 src/ss/member_level.rs create mode 100644 src/ss/site.rs diff --git a/src/c2se/backend/account.rs b/src/c2se/backend/bank.rs similarity index 55% rename from src/c2se/backend/account.rs rename to src/c2se/backend/bank.rs index e9aaba2..06dcbb4 100644 --- a/src/c2se/backend/account.rs +++ b/src/c2se/backend/bank.rs @@ -1,10 +1,7 @@ -const SUBJECT: &str = "bet.beteran.c2se.backend.account"; +const SUBJECT: &str = "bet.beteran.c2se.backend.bank"; -pub const SUBJECT_LIST_BANKS: &str = const_format::concatcp!(SUBJECT, ".ListBanks"); -// subject = bet.beteran.c2se.backend.bank.ListBanks pub const SUBJECT_CREATE_BANK: &str = const_format::concatcp!(SUBJECT, ".CreateBank"); -// subject = bet.beteran.c2se.backend.bank.CreateBank +pub const SUBJECT_LIST_BANKS: &str = const_format::concatcp!(SUBJECT, ".ListBanks"); +pub const SUBJECT_GET_BANK: &str = const_format::concatcp!(SUBJECT, ".GetBank"); pub const SUBJECT_UPDATE_BANK: &str = const_format::concatcp!(SUBJECT, ".UpdateBank"); -// subject = bet.beteran.c2se.backend.bank.UpdateBank pub const SUBJECT_DELETE_BANK: &str = const_format::concatcp!(SUBJECT, ".DeleteBank"); -// subject = bet.beteran.c2se.backend.bank.DeleteBank diff --git a/src/c2se/backend/identity.rs b/src/c2se/backend/identity.rs index 5c244f3..0237146 100644 --- a/src/c2se/backend/identity.rs +++ b/src/c2se/backend/identity.rs @@ -1,43 +1,8 @@ -use crate::protobuf::rpc; - const SUBJECT: &str = "bet.beteran.c2se.backend.identity"; pub const SUBJECT_CHECK_USERNAME_FOR_DUPLICATION: &str = const_format::concatcp!(SUBJECT, ".CheckUsernameForDuplication"); -/// subject = bet.beteran.c2se.backend.identity.CheckUsernameForDuplication; - pub const SUBJECT_CHECK_NICKNAME_FOR_DUPLICATION: &str = const_format::concatcp!(SUBJECT, ".CheckNicknameForDuplication"); -/// subject = bet.beteran.c2se.backend.identity.CheckNicknameForDuplication; - pub const SUBJECT_CAPTCHA: &str = const_format::concatcp!(SUBJECT, ".Captcha"); -/// subject = bet.beteran.c2se.backend.identity.Captcha - pub const SUBJECT_SIGNIN: &str = const_format::concatcp!(SUBJECT, ".Signin"); -/// subject = bet.beteran.c2se.backend.identity.Signin -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SigninRequest { - #[prost(string, tag = "1")] - pub security_code_hash: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub security_code: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub username: ::prost::alloc::string::String, - #[prost(string, tag = "4")] - pub password: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SigninResponse { - #[prost(message, optional, tag = "1")] - pub error: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub result: ::core::option::Option, -} -/// Nested message and enum types in `SigninResponse`. -pub mod signin_response { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Result { - #[prost(string, tag = "1")] - pub access_token: ::prost::alloc::string::String, - } -} diff --git a/src/c2se/backend/member.rs b/src/c2se/backend/member.rs index f4ac5e5..b560eb8 100644 --- a/src/c2se/backend/member.rs +++ b/src/c2se/backend/member.rs @@ -1,201 +1,9 @@ -use crate::protobuf::pagination; -use crate::protobuf::rpc; -use crate::models::member; - const SUBJECT: &str = "bet.beteran.c2se.backend.member"; - pub const SUBJECT_CREATE_MEMBER: &str = const_format::concatcp!(SUBJECT, ".CreateMember"); -/// subject = bet.beteran.c2se.backend.member.CreateMember -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CreateMemberRequest { - #[prost(string, tag="1")] - pub site_id: ::prost::alloc::string::String, - #[prost(string, tag="2")] - pub member_class_id: ::prost::alloc::string::String, - #[prost(string, tag="3")] - pub member_level_id: ::prost::alloc::string::String, - #[prost(string, optional, tag="4")] - pub referrer_member_username: ::core::option::Option<::prost::alloc::string::String>, - #[prost(string, tag="5")] - pub username: ::prost::alloc::string::String, - #[prost(string, tag="6")] - pub password: ::prost::alloc::string::String, - #[prost(string, tag="7")] - pub nickname: ::prost::alloc::string::String, - #[prost(string, optional, tag="8")] - pub mobile_phone_number: ::core::option::Option<::prost::alloc::string::String>, - #[prost(enumeration="member::MemberState", tag="9")] - pub state: i32, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CreateMemberResponse { - #[prost(message, optional, tag="1")] - pub error: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub result: ::core::option::Option, -} -/// Nested message and enum types in `CreateMemberResponse`. -pub mod create_member_response { - use crate::models::member; - - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Result { - #[prost(message, optional, tag="1")] - pub member: ::core::option::Option, - } -} - pub const SUBJECT_LIST_MEMBERS: &str = const_format::concatcp!(SUBJECT, ".ListMembers"); -/// subject = bet.beteran.c2se.backend.member.ListMembers -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ListMembersRequest { - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option, - #[prost(message, repeated, tag = "2")] - pub searches: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "3")] - pub sorts: ::prost::alloc::vec::Vec, - #[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, - #[prost(uint64, optional, tag="13")] - pub deleted_at: ::core::option::Option, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ListMembersResponse { - #[prost(message, optional, tag = "1")] - pub error: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub result: ::core::option::Option, -} -/// Nested message and enum types in `ListMembersResponse`. -pub mod list_members_response { - use crate::models::member; - - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Result { - #[prost(message, repeated, tag = "1")] - pub members: ::prost::alloc::vec::Vec, - } -} - pub const SUBJECT_GET_MEMBER: &str = const_format::concatcp!(SUBJECT, ".GetMember"); -/// subject = bet.beteran.c2se.backend.member.GetMember -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetMemberRequest { - #[prost(string, tag = "1")] - pub id: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetMemberResponse { - #[prost(message, optional, tag = "1")] - pub error: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub result: ::core::option::Option, -} -/// Nested message and enum types in `GetMemberResponse`. -pub mod get_member_response { - use crate::models::member; - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Result { - #[prost(message, optional, tag = "1")] - pub member: ::core::option::Option, - } -} pub const SUBJECT_GET_MEMBER_BY_USERNAME: &str = const_format::concatcp!(SUBJECT, ".GetMemberByUsername"); -/// subject = bet.beteran.c2se.backend.member.GetMemberByUsername -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetMemberByUsernameRequest { - #[prost(string, tag = "1")] - pub username: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetMemberByUsernameResponse { - #[prost(message, optional, tag = "1")] - pub error: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub result: ::core::option::Option, -} -/// Nested message and enum types in `GetMemberByUsernameResponse`. -pub mod get_member_by_username_response { - use crate::models::member; - - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Result { - #[prost(message, optional, tag = "1")] - pub member: ::core::option::Option, - } -} - pub const SUBJECT_UPDATE_MEMBER: &str = const_format::concatcp!(SUBJECT, ".UpdateMember"); -/// subject = bet.beteran.c2se.backend.member.UpdateMember -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct UpdateMemberRequest { - #[prost(string, tag="1")] - pub id: ::prost::alloc::string::String, - #[prost(string, optional, tag="2")] - pub site_id: ::core::option::Option<::prost::alloc::string::String>, - #[prost(string, optional, tag="3")] - pub member_level_id: ::core::option::Option<::prost::alloc::string::String>, - #[prost(string, optional, tag="4")] - pub password: ::core::option::Option<::prost::alloc::string::String>, - #[prost(string, optional, tag="5")] - pub mobile_phone_number: ::core::option::Option<::prost::alloc::string::String>, - #[prost(enumeration="member::MemberState", optional, tag="6")] - pub state: ::core::option::Option, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct UpdateMemberResponse { - #[prost(message, optional, tag="1")] - pub error: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub result: ::core::option::Option, -} -/// Nested message and enum types in `UpdateMemberResponse`. -pub mod update_member_response { - use crate::models::member; - - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Result { - #[prost(message, optional, tag="1")] - pub member: ::core::option::Option, - } -} - pub const SUBJECT_DELETE_MEMBER: &str = const_format::concatcp!(SUBJECT, ".DeleteMember"); -/// subject = bet.beteran.c2se.backend.member.DeleteMember -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DeleteMemberRequest { - #[prost(string, tag="1")] - pub id: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DeleteMemberResponse { - #[prost(message, optional, tag="1")] - pub error: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub result: ::core::option::Option, -} -/// Nested message and enum types in `DeleteMemberResponse`. -pub mod delete_member_response { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Result { - } -} diff --git a/src/c2se/backend/member_bank_account.rs b/src/c2se/backend/member_bank_account.rs new file mode 100644 index 0000000..1bac116 --- /dev/null +++ b/src/c2se/backend/member_bank_account.rs @@ -0,0 +1,7 @@ +const SUBJECT: &str = "bet.beteran.c2se.backend.member_bank_account"; + +pub const SUBJECT_CREATE_MEMBER_BANK_ACCOUNT: &str = const_format::concatcp!(SUBJECT, ".CreateMemberBankAccount"); +pub const SUBJECT_LIST_MEMBER_BANK_ACCOUNTS: &str = const_format::concatcp!(SUBJECT, ".ListMemberBankAccounts"); +pub const SUBJECT_GET_MEMBER_BANK_ACCOUNT: &str = const_format::concatcp!(SUBJECT, ".GetMemberBankAccount"); +pub const SUBJECT_UPDATE_MEMBER_BANK_ACCOUNT: &str = const_format::concatcp!(SUBJECT, ".UpdateMemberBankAccount"); +pub const SUBJECT_DELETE_MEMBER_BANK_ACCOUNT: &str = const_format::concatcp!(SUBJECT, ".DeleteMemberBankAccount"); diff --git a/src/c2se/backend/member_bank_deposit.rs b/src/c2se/backend/member_bank_deposit.rs new file mode 100644 index 0000000..004b816 --- /dev/null +++ b/src/c2se/backend/member_bank_deposit.rs @@ -0,0 +1,8 @@ +const SUBJECT: &str = "bet.beteran.c2se.backend.member_bank_deposit"; + +pub const SUBJECT_CREATE_MEMBER_BANK_DEPOSIT: &str = const_format::concatcp!(SUBJECT, ".CreateMemberBankDeposit"); +pub const SUBJECT_LIST_MEMBER_BANK_DEPOSITS: &str = const_format::concatcp!(SUBJECT, ".ListMemberBankDeposits"); +pub const SUBJECT_GET_MEMBER_BANK_DEPOSIT: &str = const_format::concatcp!(SUBJECT, ".GetMemberBankDeposit"); +pub const SUBJECT_UPDATE_MEMBER_BANK_DEPOSIT: &str = const_format::concatcp!(SUBJECT, ".UpdateMemberBankDeposit"); +pub const SUBJECT_UPDATE_MEMBER_BANK_DEPOSIT_FOR_STATE: &str = const_format::concatcp!(SUBJECT, ".UpdateMemberBankDepositForState"); +pub const SUBJECT_DELETE_MEMBER_BANK_DEPOSIT: &str = const_format::concatcp!(SUBJECT, ".DeleteMemberBankDeposit"); diff --git a/src/c2se/backend/member_bank_withdraw.rs b/src/c2se/backend/member_bank_withdraw.rs new file mode 100644 index 0000000..dc9c201 --- /dev/null +++ b/src/c2se/backend/member_bank_withdraw.rs @@ -0,0 +1,8 @@ +const SUBJECT: &str = "bet.beteran.c2se.backend.member_bank_withdraw"; + +pub const SUBJECT_CREATE_MEMBER_BANK_WITHDRAW: &str = const_format::concatcp!(SUBJECT, ".CreateMemberBankWithdraw"); +pub const SUBJECT_LIST_MEMBER_BANK_WITHDRAWS: &str = const_format::concatcp!(SUBJECT, ".ListMemberBankWithdraws"); +pub const SUBJECT_GET_MEMBER_BANK_WITHDRAW: &str = const_format::concatcp!(SUBJECT, ".GetMemberBankWithdraw"); +pub const SUBJECT_UPDATE_MEMBER_BANK_WITHDRAW: &str = const_format::concatcp!(SUBJECT, ".UpdateMemberBankWithdraw"); +pub const SUBJECT_UPDATE_MEMBER_BANK_WITHDRAW_FOR_STATE: &str = const_format::concatcp!(SUBJECT, ".UpdateMemberBankWithdrawForState"); +pub const SUBJECT_DELETE_MEMBER_BANK_WITHDRAW: &str = const_format::concatcp!(SUBJECT, ".DeleteMemberBankWithdraw"); diff --git a/src/c2se/backend/member_class.rs b/src/c2se/backend/member_class.rs index 0aa8e50..2ae8a55 100644 --- a/src/c2se/backend/member_class.rs +++ b/src/c2se/backend/member_class.rs @@ -1,136 +1,7 @@ -use crate::protobuf; - const SUBJECT: &str = "bet.beteran.c2se.backend.member_class"; pub const SUBJECT_CREATE_MEMBER_CLASS: &str = const_format::concatcp!(SUBJECT, ".CreateMemberClass"); -/// subject = bet.beteran.c2se.backend.member_class.CreateMemberClass -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CreateMemberClassRequest { - #[prost(string, optional, tag="1")] - pub parent_id: ::core::option::Option<::prost::alloc::string::String>, - #[prost(string, tag="2")] - pub name: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CreateMemberClassResponse { - #[prost(message, optional, tag="1")] - pub error: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub result: ::core::option::Option, -} -/// Nested message and enum types in `CreateMemberClassResponse`. -pub mod create_member_class_response { - use crate::models::member; - - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Result { - #[prost(message, optional, tag="1")] - pub member_class: ::core::option::Option, - } -} - -pub const SUBJECT_LIST_MEMBER_CLASSES: &str = const_format::concatcp!(SUBJECT, ".ListMemberClasses"); -/// subject = bet.beteran.c2se.backend.member_class.ListMemberClasses -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ListMemberClassesRequest { - #[prost(message, optional, tag="1")] - pub pagination: ::core::option::Option, - #[prost(message, repeated, tag="2")] - pub searches: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="3")] - pub sorts: ::prost::alloc::vec::Vec, - #[prost(string, optional, tag="4")] - pub name_like: ::core::option::Option<::prost::alloc::string::String>, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ListMemberClassesResponse { - #[prost(message, optional, tag="1")] - pub error: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub result: ::core::option::Option, -} -/// Nested message and enum types in `ListMemberClassesResponse`. -pub mod list_member_classes_response { - use crate::models::member; - - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Result { - #[prost(message, repeated, tag="1")] - pub member_classes: ::prost::alloc::vec::Vec, - } -} - +pub const SUBJECT_LIST_MEMBER_CLASSSES: &str = const_format::concatcp!(SUBJECT, ".ListMemberClasses"); pub const SUBJECT_GET_MEMBER_CLASS: &str = const_format::concatcp!(SUBJECT, ".GetMemberClass"); -/// subject = bet.beteran.c2se.backend.member_class.GetMemberClass -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetMemberClassRequest { - #[prost(string, tag="1")] - pub id: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetMemberClassResponse { - #[prost(message, optional, tag="1")] - pub error: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub result: ::core::option::Option, -} -/// Nested message and enum types in `GetMemberClassResponse`. -pub mod get_member_class_response { - use crate::models::member; - - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Result { - #[prost(message, optional, tag="1")] - pub member_class: ::core::option::Option, - } -} - pub const SUBJECT_UPDATE_MEMBER_CLASS: &str = const_format::concatcp!(SUBJECT, ".UpdateMemberClass"); -/// subject = bet.beteran.c2se.backend.member_class.UpdateMemberClass -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct UpdateMemberClassRequest { - #[prost(string, tag="1")] - pub id: ::prost::alloc::string::String, - #[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, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct UpdateMemberClassResponse { - #[prost(message, optional, tag="1")] - pub error: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub result: ::core::option::Option, -} -/// Nested message and enum types in `UpdateMemberClassResponse`. -pub mod update_member_class_response { - use crate::models::member; - - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Result { - #[prost(message, optional, tag="1")] - pub member_class: ::core::option::Option, - } -} - pub const SUBJECT_DELETE_MEMBER_CLASS: &str = const_format::concatcp!(SUBJECT, ".DeleteMemberClass"); -/// subject = bet.beteran.c2se.backend.member_class.DeleteMemberClass -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DeleteMemberClassRequest { - #[prost(string, tag="1")] - pub id: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DeleteMemberClassResponse { - #[prost(message, optional, tag="1")] - pub error: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub result: ::core::option::Option, -} -/// Nested message and enum types in `DeleteMemberClassResponse`. -pub mod delete_member_class_response { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Result { - } -} diff --git a/src/c2se/backend/member_level.rs b/src/c2se/backend/member_level.rs index b60d4bc..0247c4a 100644 --- a/src/c2se/backend/member_level.rs +++ b/src/c2se/backend/member_level.rs @@ -1,135 +1,7 @@ -use crate::protobuf; - const SUBJECT: &str = "bet.beteran.c2se.backend.member_level"; pub const SUBJECT_CREATE_MEMBER_LEVEL: &str = const_format::concatcp!(SUBJECT, ".CreateMemberLevel"); -/// subject = bet.beteran.c2se.backend.member_level.CreateMemberLevel -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CreateMemberLevelRequest { - #[prost(string, tag="1")] - pub name: ::prost::alloc::string::String, - #[prost(uint32, tag="2")] - pub sort_order: u32, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CreateMemberLevelResponse { - #[prost(message, optional, tag="1")] - pub error: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub result: ::core::option::Option, -} -/// Nested message and enum types in `CreateMemberLevelResponse`. -pub mod create_member_level_response { - use crate::models::member; - - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Result { - #[prost(message, optional, tag="1")] - pub member_level: ::core::option::Option, - } -} -pub const SUBJECT_LIST_MEMBER_LEVELS: &str = const_format::concatcp!(SUBJECT, ".ListMemberLevels"); -/// subject = bet.beteran.c2se.backend.member_level.ListMemberLevels -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ListMemberLevelsRequest { - #[prost(message, optional, tag="1")] - pub pagination: ::core::option::Option, - #[prost(message, repeated, tag="2")] - pub searches: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="3")] - pub sorts: ::prost::alloc::vec::Vec, - #[prost(string, optional, tag="4")] - pub name_like: ::core::option::Option<::prost::alloc::string::String>, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ListMemberLevelsResponse { - #[prost(message, optional, tag="1")] - pub error: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub result: ::core::option::Option, -} -/// Nested message and enum types in `ListMemberLevelsResponse`. -pub mod list_member_levels_response { - use crate::models::member; - - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Result { - #[prost(message, repeated, tag="1")] - pub member_levels: ::prost::alloc::vec::Vec, - } -} - +pub const SUBJECT_LIST_MEMBER_LEVELSS: &str = const_format::concatcp!(SUBJECT, ".ListMemberLevels"); pub const SUBJECT_GET_MEMBER_LEVEL: &str = const_format::concatcp!(SUBJECT, ".GetMemberLevel"); -/// subject = bet.beteran.c2se.backend.member_level.GetMemberLevel -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetMemberLevelRequest { - #[prost(string, tag="1")] - pub id: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetMemberLevelResponse { - #[prost(message, optional, tag="1")] - pub error: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub result: ::core::option::Option, -} -/// Nested message and enum types in `GetMemberLevelResponse`. -pub mod get_member_level_response { - use crate::models::member; - - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Result { - #[prost(message, optional, tag="1")] - pub member_level: ::core::option::Option, - } -} - pub const SUBJECT_UPDATE_MEMBER_LEVEL: &str = const_format::concatcp!(SUBJECT, ".UpdateMemberLevel"); -/// subject = bet.beteran.c2se.backend.member_level.UpdateMemberLevel -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct UpdateMemberLevelRequest { - #[prost(string, tag="1")] - pub id: ::prost::alloc::string::String, - #[prost(string, tag="2")] - pub name: ::prost::alloc::string::String, - #[prost(uint32, tag="3")] - pub sort_order: u32, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct UpdateMemberLevelResponse { - #[prost(message, optional, tag="1")] - pub error: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub result: ::core::option::Option, -} -/// Nested message and enum types in `UpdateMemberLevelResponse`. -pub mod update_member_level_response { - use crate::models::member; - - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Result { - #[prost(message, optional, tag="1")] - pub member_level: ::core::option::Option, - } -} - pub const SUBJECT_DELETE_MEMBER_LEVEL: &str = const_format::concatcp!(SUBJECT, ".DeleteMemberLevel"); -/// subject = bet.beteran.c2se.backend.member_level.DeleteMemberLevel -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DeleteMemberLevelRequest { - #[prost(string, tag="1")] - pub id: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DeleteMemberLevelResponse { - #[prost(message, optional, tag="1")] - pub error: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub result: ::core::option::Option, -} -/// Nested message and enum types in `DeleteMemberLevelResponse`. -pub mod delete_member_level_response { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Result { - } -} diff --git a/src/c2se/backend/mod.rs b/src/c2se/backend/mod.rs index e11dd95..6aff3c8 100644 --- a/src/c2se/backend/mod.rs +++ b/src/c2se/backend/mod.rs @@ -1,6 +1,9 @@ +pub mod bank; pub mod identity; -pub mod member; +pub mod member_bank_account; +pub mod member_bank_deposit; +pub mod member_bank_withdraw; pub mod member_class; pub mod member_level; +pub mod member; pub mod site; -pub mod account; diff --git a/src/c2se/backend/site.rs b/src/c2se/backend/site.rs index f01847e..5df7b19 100644 --- a/src/c2se/backend/site.rs +++ b/src/c2se/backend/site.rs @@ -1,142 +1,7 @@ -use crate::protobuf::pagination; -use crate::protobuf::rpc; - const SUBJECT: &str = "bet.beteran.c2se.backend.site"; -pub const SUBJECT_LIST_SITES: &str = const_format::concatcp!(SUBJECT, ".ListSites"); -/// subject = bet.beteran.c2se.backend.site.ListSites -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ListSitesRequest { - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option, - #[prost(message, repeated, tag = "2")] - pub searches: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "3")] - pub sorts: ::prost::alloc::vec::Vec, - #[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, - #[prost(bool, optional, tag="8")] - pub can_use: ::core::option::Option, - #[prost(string, optional, tag="9")] - pub memo_like: ::core::option::Option<::prost::alloc::string::String>, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ListSitesResponse { - #[prost(message, optional, tag = "1")] - pub error: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub result: ::core::option::Option, -} - -/// Nested message and enum types in `ListSitesResponse`. -pub mod list_sites_response { - use crate::models::domain; - - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Result { - #[prost(message, repeated, tag = "1")] - pub sites: ::prost::alloc::vec::Vec, - } -} - pub const SUBJECT_CREATE_SITE: &str = const_format::concatcp!(SUBJECT, ".CreateSite"); -/// subject = bet.beteran.c2se.backend.site.CreateSite -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CreateSiteRequest { - #[prost(string, tag="1")] - pub url: ::prost::alloc::string::String, - #[prost(string, optional, tag="2")] - pub name: ::core::option::Option<::prost::alloc::string::String>, - #[prost(string, optional, tag="3")] - pub path: ::core::option::Option<::prost::alloc::string::String>, - #[prost(bool, tag="4")] - pub show: bool, - #[prost(bool, tag="5")] - pub can_use: bool, - #[prost(string, optional, tag="6")] - pub memo: ::core::option::Option<::prost::alloc::string::String>, - #[prost(uint64, optional, tag="7")] - pub expires_at: ::core::option::Option, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CreateSiteResponse { - #[prost(message, optional, tag = "1")] - pub error: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub result: ::core::option::Option, -} -/// Nested message and enum types in `CreateSiteResponse`. -pub mod create_site_response { - use crate::models::domain; - - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Result { - #[prost(message, optional, tag = "1")] - pub site: ::core::option::Option, - } -} - +pub const SUBJECT_LIST_SITES: &str = const_format::concatcp!(SUBJECT, ".ListSites"); +pub const SUBJECT_GET_SITE: &str = const_format::concatcp!(SUBJECT, ".GetSite"); pub const SUBJECT_UPDATE_SITE: &str = const_format::concatcp!(SUBJECT, ".UpdateSite"); -/// subject = bet.beteran.c2se.backend.site.UpdateSite -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct UpdateSiteRequest { - #[prost(string, tag="1")] - pub id: ::prost::alloc::string::String, - #[prost(string, tag="2")] - pub url: ::prost::alloc::string::String, - #[prost(string, optional, tag="3")] - pub name: ::core::option::Option<::prost::alloc::string::String>, - #[prost(string, optional, tag="4")] - pub path: ::core::option::Option<::prost::alloc::string::String>, - #[prost(bool, tag="5")] - pub show: bool, - #[prost(bool, tag="6")] - pub can_use: bool, - #[prost(string, optional, tag="7")] - pub memo: ::core::option::Option<::prost::alloc::string::String>, - #[prost(uint64, optional, tag="8")] - pub expires_at: ::core::option::Option, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct UpdateSiteResponse { - #[prost(message, optional, tag = "1")] - pub error: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub result: ::core::option::Option, -} -/// Nested message and enum types in `UpdateSiteResponse`. -pub mod update_site_response { - use crate::models::domain; - - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Result { - #[prost(message, optional, tag = "1")] - pub site: ::core::option::Option, - } -} - pub const SUBJECT_DELETE_SITE: &str = const_format::concatcp!(SUBJECT, ".DeleteSite"); -/// subject = bet.beteran.c2se.backend.site.DeleteSite -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DeleteSiteRequest { - #[prost(string, tag = "1")] - pub id: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DeleteSiteResponse { - #[prost(message, optional, tag = "1")] - pub error: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub result: ::core::option::Option, -} -/// Nested message and enum types in `DeleteSiteResponse`. -pub mod delete_site_response { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Result {} -} diff --git a/src/ss/account/bank.rs b/src/c2se/bank.rs similarity index 53% rename from src/ss/account/bank.rs rename to src/c2se/bank.rs index 5231388..9a5e95d 100644 --- a/src/ss/account/bank.rs +++ b/src/c2se/bank.rs @@ -1,17 +1,9 @@ -use crate::protobuf::rpc; -use crate::protobuf::pagination; -use crate::models::core; - -const SUBJECT: &str = "bet.beteran.ss.account.bank"; - -pub const SUBJECT_CREATE_BANK: &str = const_format::concatcp!(SUBJECT, ".CreateBank"); -/// subject = bet.beteran.ss.account.bank.CreateBank; #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateBankRequest { - #[prost(message, optional, tag="1")] - pub client: ::core::option::Option, - #[prost(string, tag="2")] + #[prost(string, tag="1")] pub name: ::prost::alloc::string::String, + #[prost(uint32, tag="2")] + pub sort_order: u32, #[prost(bool, tag="3")] pub show: bool, #[prost(bool, tag="4")] @@ -22,70 +14,84 @@ pub struct CreateBankRequest { #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateBankResponse { #[prost(message, optional, tag="1")] - pub error: ::core::option::Option, + pub error: ::core::option::Option, #[prost(message, optional, tag="2")] pub result: ::core::option::Option, } /// Nested message and enum types in `CreateBankResponse`. pub mod create_bank_response { - use crate::models::account; - #[derive(Clone, PartialEq, ::prost::Message)] pub struct Result { #[prost(message, optional, tag="1")] - pub bank: ::core::option::Option, + pub bank: ::core::option::Option, } } - -pub const SUBJECT_LIST_BANKS: &str = const_format::concatcp!(SUBJECT, ".ListBanks"); -/// subject = bet.beteran.ss.account.bank.ListBanks; #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListBanksRequest { #[prost(message, optional, tag="1")] - pub client: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub pagination: ::core::option::Option, - #[prost(message, repeated, tag="3")] - pub searches: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="4")] - pub sorts: ::prost::alloc::vec::Vec, - #[prost(string, optional, tag="5")] - pub name_like: ::core::option::Option<::prost::alloc::string::String>, - #[prost(bool, optional, tag="6")] - pub show: ::core::option::Option, - #[prost(bool, optional, tag="7")] - pub can_use: ::core::option::Option, - #[prost(string, optional, tag="8")] - pub memo_like: ::core::option::Option<::prost::alloc::string::String>, + pub pagination: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub sorts: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag="3")] + pub search: ::core::option::Option, +} +/// Nested message and enum types in `ListBanksRequest`. +pub mod list_banks_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Search { + #[prost(string, optional, tag="1")] + pub name_like: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bool, optional, tag="2")] + pub show: ::core::option::Option, + #[prost(bool, optional, tag="3")] + pub can_use: ::core::option::Option, + #[prost(string, optional, tag="4")] + pub memo_like: ::core::option::Option<::prost::alloc::string::String>, + } } #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListBanksResponse { #[prost(message, optional, tag="1")] - pub error: ::core::option::Option, + pub error: ::core::option::Option, #[prost(message, optional, tag="2")] pub result: ::core::option::Option, } /// Nested message and enum types in `ListBanksResponse`. pub mod list_banks_response { - use crate::models::account; - - #[derive(Clone, PartialEq, ::prost::Message)] + #[derive(Clone, PartialEq, ::prost::Message)] pub struct Result { #[prost(message, repeated, tag="1")] - pub banks: ::prost::alloc::vec::Vec, + pub banks: ::prost::alloc::vec::Vec, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetBankRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetBankResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `GetBankResponse`. +pub mod get_bank_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub bank: ::core::option::Option, } } - -pub const SUBJECT_UPDATE_BANK: &str = const_format::concatcp!(SUBJECT, ".UpdateBank"); -/// subject = bet.beteran.ss.account.bank.UpdateBank #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateBankRequest { - #[prost(message, optional, tag="1")] - pub client: ::core::option::Option, - #[prost(string, tag="2")] + #[prost(string, tag="1")] pub id: ::prost::alloc::string::String, - #[prost(string, tag="3")] + #[prost(string, tag="2")] pub name: ::prost::alloc::string::String, + #[prost(uint32, tag="3")] + pub sort_order: u32, #[prost(bool, tag="4")] pub show: bool, #[prost(bool, tag="5")] @@ -96,34 +102,27 @@ pub struct UpdateBankRequest { #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateBankResponse { #[prost(message, optional, tag="1")] - pub error: ::core::option::Option, + pub error: ::core::option::Option, #[prost(message, optional, tag="2")] pub result: ::core::option::Option, } /// Nested message and enum types in `UpdateBankResponse`. pub mod update_bank_response { - use crate::models::account; - - #[derive(Clone, PartialEq, ::prost::Message)] + #[derive(Clone, PartialEq, ::prost::Message)] pub struct Result { #[prost(message, optional, tag="1")] - pub bank: ::core::option::Option, + pub bank: ::core::option::Option, } } - -pub const SUBJECT_DELETE_BANK: &str = const_format::concatcp!(SUBJECT, ".DeleteBank"); -/// subject = bet.beteran.ss.account.bank.DeleteBank #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteBankRequest { - #[prost(message, optional, tag="1")] - pub client: ::core::option::Option, - #[prost(string, tag="2")] + #[prost(string, tag="1")] pub id: ::prost::alloc::string::String, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteBankResponse { #[prost(message, optional, tag="1")] - pub error: ::core::option::Option, + pub error: ::core::option::Option, #[prost(message, optional, tag="2")] pub result: ::core::option::Option, } diff --git a/src/c2se/common/bank.rs b/src/c2se/common/bank.rs deleted file mode 100644 index 8d42d47..0000000 --- a/src/c2se/common/bank.rs +++ /dev/null @@ -1,130 +0,0 @@ -use crate::protobuf::rpc; -use crate::protobuf::pagination; - -const SUBJECT: &str = "bet.beteran.c2se.common.bank"; - -pub const SUBJECT_CREATE_BANK: &str = const_format::concatcp!(SUBJECT, ".CreateBank"); -/// subject = bet.beteran.c2se.common.bank.CreateBank -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CreateBankRequest { - #[prost(string, tag="1")] - pub name: ::prost::alloc::string::String, - #[prost(bool, tag="2")] - pub show: bool, - #[prost(bool, tag="3")] - pub can_use: bool, - #[prost(string, optional, tag="4")] - pub memo: ::core::option::Option<::prost::alloc::string::String>, - #[prost(uint64, optional, tag="5")] - pub expires_at: ::core::option::Option, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CreateBankResponse { - #[prost(message, optional, tag="1")] - pub error: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub result: ::core::option::Option, -} -/// Nested message and enum types in `CreateBankResponse`. -pub mod create_bank_response { - use crate::models::account; - - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Result { - #[prost(message, optional, tag="1")] - pub bank: ::core::option::Option, - } -} - -pub const SUBJECT_LIST_BANKS: &str = const_format::concatcp!(SUBJECT, ".ListBanks"); -/// subject = bet.beteran.c2se.common.bank.ListBanks -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ListBanksRequest { - #[prost(message, optional, tag="1")] - pub pagination: ::core::option::Option, - #[prost(message, repeated, tag="2")] - pub searches: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="3")] - pub sorts: ::prost::alloc::vec::Vec, - #[prost(string, optional, tag="4")] - pub name_like: ::core::option::Option<::prost::alloc::string::String>, - #[prost(bool, optional, tag="5")] - pub show: ::core::option::Option, - #[prost(bool, optional, tag="6")] - pub can_use: ::core::option::Option, - #[prost(string, optional, tag="7")] - pub memo_like: ::core::option::Option<::prost::alloc::string::String>, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ListBanksResponse { - #[prost(message, optional, tag="1")] - pub error: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub result: ::core::option::Option, -} -/// Nested message and enum types in `ListBanksResponse`. -pub mod list_banks_response { - use crate::models::account; - - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Result { - #[prost(message, repeated, tag="1")] - pub banks: ::prost::alloc::vec::Vec, - } -} - - - -pub const SUBJECT_UPDATE_BANK: &str = const_format::concatcp!(SUBJECT, ".UpdateBank"); -/// subject = bet.beteran.c2se.common.bank.UpdateBank -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct UpdateBankRequest { - #[prost(string, tag="1")] - pub id: ::prost::alloc::string::String, - #[prost(string, tag="2")] - pub name: ::prost::alloc::string::String, - #[prost(bool, tag="3")] - pub show: bool, - #[prost(bool, tag="4")] - pub can_use: bool, - #[prost(string, optional, tag="5")] - pub memo: ::core::option::Option<::prost::alloc::string::String>, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct UpdateBankResponse { - #[prost(message, optional, tag="1")] - pub error: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub result: ::core::option::Option, -} -/// Nested message and enum types in `UpdateBankResponse`. -pub mod update_bank_response { - use crate::models::account; - - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Result { - #[prost(message, optional, tag="1")] - pub bank: ::core::option::Option, - } -} - -pub const SUBJECT_DELETE_BANK: &str = const_format::concatcp!(SUBJECT, ".DeleteBank"); -/// subject = bet.beteran.c2se.common.bank.DeleteBank -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DeleteBankRequest { - #[prost(string, tag="1")] - pub id: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DeleteBankResponse { - #[prost(message, optional, tag="1")] - pub error: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub result: ::core::option::Option, -} -/// Nested message and enum types in `DeleteBankResponse`. -pub mod delete_bank_response { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Result { - } -} diff --git a/src/c2se/common/identity.rs b/src/c2se/common/identity.rs deleted file mode 100644 index 476f6b6..0000000 --- a/src/c2se/common/identity.rs +++ /dev/null @@ -1,71 +0,0 @@ -use crate::protobuf::rpc; - -const SUBJECT: &str = "bet.beteran.c2se.common.identity"; - -pub const SUBJECT_CHECK_USERNAME_FOR_DUPLICATION: &str = - const_format::concatcp!(SUBJECT, ".CheckUsernameForDuplication"); -/// subject = bet.beteran.c2se.common.identity.CheckUsernameForDuplication; -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CheckUsernameForDuplicationRequest { - #[prost(string, tag = "1")] - pub username: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CheckUsernameForDuplicationResponse { - #[prost(message, optional, tag = "1")] - pub error: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub result: ::core::option::Option, -} -/// Nested message and enum types in `CheckUsernameForDuplicationResponse`. -pub mod check_username_for_duplication_response { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Result { - #[prost(bool, tag = "1")] - pub duplicated: bool, - } -} -pub const SUBJECT_CHECK_NICKNAME_FOR_DUPLICATION: &str = - const_format::concatcp!(SUBJECT, ".CheckNicknameForDuplication"); -/// subject = bet.beteran.c2se.common.identity.CheckNicknameForDuplication; -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CheckNicknameForDuplicationRequest { - #[prost(string, tag = "1")] - pub nickname: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CheckNicknameForDuplicationResponse { - #[prost(message, optional, tag = "1")] - pub error: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub result: ::core::option::Option, -} -/// Nested message and enum types in `CheckNicknameForDuplicationResponse`. -pub mod check_nickname_for_duplication_response { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Result { - #[prost(bool, tag = "1")] - pub duplicated: bool, - } -} -pub const SUBJECT_CAPTCHA: &str = const_format::concatcp!(SUBJECT, ".Captcha"); -/// subject = bet.beteran.c2se.common.identity.Captcha -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CaptchaRequest {} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CaptchaResponse { - #[prost(message, optional, tag = "1")] - pub error: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub result: ::core::option::Option, -} -/// Nested message and enum types in `CaptchaResponse`. -pub mod captcha_response { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Result { - #[prost(string, tag = "1")] - pub security_code_hash: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub image: ::prost::alloc::string::String, - } -} diff --git a/src/c2se/common/mod.rs b/src/c2se/common/mod.rs deleted file mode 100644 index 91231e3..0000000 --- a/src/c2se/common/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod identity; -pub mod bank; diff --git a/src/c2se/core/network.rs b/src/c2se/core/network.rs index 0069248..e69de29 100644 --- a/src/c2se/core/network.rs +++ b/src/c2se/core/network.rs @@ -1,3 +0,0 @@ -const HEADER: &str = "bet.beteran.c2se.core.network"; - -pub const HEADER_CLIENT: &str = const_format::concatcp!(HEADER, ".Client"); diff --git a/src/c2se/frontend/account.rs b/src/c2se/frontend/account.rs deleted file mode 100644 index 5e936d1..0000000 --- a/src/c2se/frontend/account.rs +++ /dev/null @@ -1,7 +0,0 @@ -use crate::protobuf::pagination; -use crate::protobuf::rpc; - -const SUBJECT: &str = "bet.beteran.c2se.frontend.account"; - -pub const SUBJECT_LIST_BANKS: &str = const_format::concatcp!(SUBJECT, ".ListBanks"); -// subject = bet.beteran.c2se.frontend.bank.ListBanks diff --git a/src/c2se/frontend/bank.rs b/src/c2se/frontend/bank.rs new file mode 100644 index 0000000..c96fa11 --- /dev/null +++ b/src/c2se/frontend/bank.rs @@ -0,0 +1,4 @@ +const SUBJECT: &str = "bet.beteran.c2se.frontend.bank"; + +pub const SUBJECT_LIST_BANKS: &str = const_format::concatcp!(SUBJECT, ".ListBanks"); +pub const SUBJECT_GET_BANK: &str = const_format::concatcp!(SUBJECT, ".GetBank"); diff --git a/src/c2se/frontend/identity.rs b/src/c2se/frontend/identity.rs index 1916b17..e04aec2 100644 --- a/src/c2se/frontend/identity.rs +++ b/src/c2se/frontend/identity.rs @@ -1,43 +1,8 @@ -use crate::protobuf::rpc; - const SUBJECT: &str = "bet.beteran.c2se.frontend.identity"; pub const SUBJECT_CHECK_USERNAME_FOR_DUPLICATION: &str = const_format::concatcp!(SUBJECT, ".CheckUsernameForDuplication"); -/// subject = bet.beteran.c2se.frontend.identity.CheckUsernameForDuplication; - pub const SUBJECT_CHECK_NICKNAME_FOR_DUPLICATION: &str = const_format::concatcp!(SUBJECT, ".CheckNicknameForDuplication"); -/// subject = bet.beteran.c2se.frontend.identity.CheckNicknameForDuplication; - pub const SUBJECT_CAPTCHA: &str = const_format::concatcp!(SUBJECT, ".Captcha"); -/// subject = bet.beteran.c2se.frontend.identity.Captcha - pub const SUBJECT_SIGNIN: &str = const_format::concatcp!(SUBJECT, ".Signin"); -/// subject = bet.beteran.c2se.frontend.identity.Signin -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SigninRequest { - #[prost(string, tag = "1")] - pub security_code_hash: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub security_code: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub username: ::prost::alloc::string::String, - #[prost(string, tag = "4")] - pub password: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SigninResponse { - #[prost(message, optional, tag = "1")] - pub error: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub result: ::core::option::Option, -} -/// Nested message and enum types in `SigninResponse`. -pub mod signin_response { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Result { - #[prost(string, tag = "1")] - pub access_token: ::prost::alloc::string::String, - } -} diff --git a/src/c2se/frontend/mod.rs b/src/c2se/frontend/mod.rs index db53a0c..9d6221e 100644 --- a/src/c2se/frontend/mod.rs +++ b/src/c2se/frontend/mod.rs @@ -1 +1,9 @@ +pub mod bank; pub mod identity; +// pub mod member_bank_account; +// pub mod member_bank_deposit; +// pub mod member_bank_withdraw; +// pub mod member_class; +// pub mod member_level; +// pub mod member; +// pub mod site; diff --git a/src/c2se/identity.rs b/src/c2se/identity.rs new file mode 100644 index 0000000..ba42fc4 --- /dev/null +++ b/src/c2se/identity.rs @@ -0,0 +1,86 @@ +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CheckUsernameForDuplicationRequest { + #[prost(string, tag="1")] + pub username: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CheckUsernameForDuplicationResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `CheckUsernameForDuplicationResponse`. +pub mod check_username_for_duplication_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(bool, tag="1")] + pub duplicated: bool, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CheckNicknameForDuplicationRequest { + #[prost(string, tag="1")] + pub nickname: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CheckNicknameForDuplicationResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `CheckNicknameForDuplicationResponse`. +pub mod check_nickname_for_duplication_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(bool, tag="1")] + pub duplicated: bool, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CaptchaRequest { +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CaptchaResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `CaptchaResponse`. +pub mod captcha_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(string, tag="1")] + pub security_code_hash: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub image: ::prost::alloc::string::String, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SigninRequest { + #[prost(string, tag="1")] + pub security_code_hash: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub security_code: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub username: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub password: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SigninResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `SigninResponse`. +pub mod signin_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(string, tag="1")] + pub access_token: ::prost::alloc::string::String, + } +} diff --git a/src/ss/member/member.rs b/src/c2se/member.rs similarity index 50% rename from src/ss/member/member.rs rename to src/c2se/member.rs index adf87c0..de0dadb 100644 --- a/src/ss/member/member.rs +++ b/src/c2se/member.rs @@ -1,210 +1,188 @@ -use crate::models::core; -use crate::protobuf::rpc; -use crate::protobuf::pagination; -use crate::models::member; - -const SUBJECT: &str = "bet.beteran.ss.member"; - - -pub const SUBJECT_CREATE_MEMBER: &str = const_format::concatcp!(SUBJECT, ".CreateMember"); -/// subject = bet.beteran.ss.member.CreateMember #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateMemberRequest { - #[prost(message, optional, tag="1")] - pub client: ::core::option::Option, - #[prost(string, tag="2")] + #[prost(string, tag="1")] pub site_id: ::prost::alloc::string::String, - #[prost(string, tag="3")] + #[prost(string, tag="2")] pub member_class_id: ::prost::alloc::string::String, - #[prost(string, tag="4")] + #[prost(string, tag="3")] pub member_level_id: ::prost::alloc::string::String, - #[prost(string, optional, tag="5")] + #[prost(string, optional, tag="4")] pub referrer_member_username: ::core::option::Option<::prost::alloc::string::String>, - #[prost(string, tag="6")] + #[prost(string, tag="5")] pub username: ::prost::alloc::string::String, - #[prost(string, tag="7")] + #[prost(string, tag="6")] pub password: ::prost::alloc::string::String, - #[prost(string, tag="8")] + #[prost(string, tag="7")] pub nickname: ::prost::alloc::string::String, - #[prost(string, optional, tag="9")] + #[prost(string, optional, tag="8")] pub mobile_phone_number: ::core::option::Option<::prost::alloc::string::String>, - #[prost(enumeration="member::MemberState", tag="10")] + #[prost(enumeration="crate::models::member::MemberState", tag="9")] pub state: i32, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateMemberResponse { #[prost(message, optional, tag="1")] - pub error: ::core::option::Option, + pub error: ::core::option::Option, #[prost(message, optional, tag="2")] pub result: ::core::option::Option, } /// Nested message and enum types in `CreateMemberResponse`. pub mod create_member_response { - use crate::models::member; - #[derive(Clone, PartialEq, ::prost::Message)] pub struct Result { #[prost(message, optional, tag="1")] - pub member: ::core::option::Option, + pub member: ::core::option::Option, } } - -pub const SUBJECT_LIST_MEMBERS: &str = const_format::concatcp!(SUBJECT, ".ListMembers"); -/// subject = bet.beteran.ss.member.ListMembers #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListMembersRequest { #[prost(message, optional, tag="1")] - pub client: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub pagination: ::core::option::Option, - #[prost(message, repeated, tag="3")] - pub searches: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="4")] - pub sorts: ::prost::alloc::vec::Vec, - #[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, - #[prost(uint64, optional, tag="14")] - pub deleted_at: ::core::option::Option, + pub pagination: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub sorts: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag="3")] + pub search: ::core::option::Option, +} +/// Nested message and enum types in `ListMembersRequest`. +pub mod list_members_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Search { + #[prost(string, optional, tag="1")] + pub site_id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="2")] + pub member_class_id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="3")] + pub member_level_id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="4")] + pub referrer_member_id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="5")] + pub username_like: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="6")] + pub nickname_like: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="7")] + pub mobile_phone_number_like: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="8")] + pub last_signined_ip: ::core::option::Option<::prost::alloc::string::String>, + #[prost(enumeration="crate::models::member::MemberState", optional, tag="9")] + pub state: ::core::option::Option, + #[prost(uint64, optional, tag="10")] + pub deleted_at: ::core::option::Option, + } } #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListMembersResponse { #[prost(message, optional, tag="1")] - pub error: ::core::option::Option, + pub error: ::core::option::Option, #[prost(message, optional, tag="2")] pub result: ::core::option::Option, } /// Nested message and enum types in `ListMembersResponse`. pub mod list_members_response { - use crate::models::member; - - #[derive(Clone, PartialEq, ::prost::Message)] + #[derive(Clone, PartialEq, ::prost::Message)] pub struct Result { #[prost(message, repeated, tag="1")] - pub members: ::prost::alloc::vec::Vec, + pub members: ::prost::alloc::vec::Vec, } } - -pub const SUBJECT_GET_MEMBER: &str = const_format::concatcp!(SUBJECT, ".GetMember"); -/// subject = bet.beteran.ss.member.GetMember #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetMemberRequest { - #[prost(message, optional, tag="1")] - pub client: ::core::option::Option, - #[prost(string, tag="2")] + #[prost(string, tag="1")] pub id: ::prost::alloc::string::String, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetMemberResponse { #[prost(message, optional, tag="1")] - pub error: ::core::option::Option, + pub error: ::core::option::Option, #[prost(message, optional, tag="2")] pub result: ::core::option::Option, } /// Nested message and enum types in `GetMemberResponse`. pub mod get_member_response { - use crate::models::member; - - #[derive(Clone, PartialEq, ::prost::Message)] + #[derive(Clone, PartialEq, ::prost::Message)] pub struct Result { #[prost(message, optional, tag="1")] - pub member: ::core::option::Option, + pub member: ::core::option::Option, } } - -pub const SUBJECT_GET_MEMBER_BY_USERNAME: &str = - const_format::concatcp!(SUBJECT, ".GetMemberByUsername"); -/// subject = bet.beteran.ss.member.GetMemberByUsername #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetMemberByUsernameRequest { - #[prost(message, optional, tag="1")] - pub client: ::core::option::Option, - #[prost(string, tag="2")] + #[prost(string, tag="1")] pub username: ::prost::alloc::string::String, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetMemberByUsernameResponse { #[prost(message, optional, tag="1")] - pub error: ::core::option::Option, + pub error: ::core::option::Option, #[prost(message, optional, tag="2")] pub result: ::core::option::Option, } /// Nested message and enum types in `GetMemberByUsernameResponse`. pub mod get_member_by_username_response { - use crate::models::member; - - #[derive(Clone, PartialEq, ::prost::Message)] + #[derive(Clone, PartialEq, ::prost::Message)] pub struct Result { #[prost(message, optional, tag="1")] - pub member: ::core::option::Option, + pub member: ::core::option::Option, } } - -pub const SUBJECT_UPDATE_MEMBER: &str = const_format::concatcp!(SUBJECT, ".UpdateMember"); -/// subject = bet.beteran.ss.member.UpdateMember #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateMemberRequest { - #[prost(message, optional, tag="1")] - pub client: ::core::option::Option, - #[prost(string, tag="2")] + #[prost(string, tag="1")] pub id: ::prost::alloc::string::String, - #[prost(string, optional, tag="3")] + #[prost(string, optional, tag="2")] pub site_id: ::core::option::Option<::prost::alloc::string::String>, - #[prost(string, optional, tag="4")] + #[prost(string, optional, tag="3")] pub member_level_id: ::core::option::Option<::prost::alloc::string::String>, - #[prost(string, optional, tag="5")] + #[prost(string, optional, tag="4")] pub password: ::core::option::Option<::prost::alloc::string::String>, - #[prost(string, optional, tag="6")] + #[prost(string, optional, tag="5")] pub mobile_phone_number: ::core::option::Option<::prost::alloc::string::String>, - #[prost(enumeration="member::MemberState", optional, tag="7")] - pub state: ::core::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateMemberResponse { #[prost(message, optional, tag="1")] - pub error: ::core::option::Option, + pub error: ::core::option::Option, #[prost(message, optional, tag="2")] pub result: ::core::option::Option, } /// Nested message and enum types in `UpdateMemberResponse`. pub mod update_member_response { - use crate::models::member; - #[derive(Clone, PartialEq, ::prost::Message)] pub struct Result { #[prost(message, optional, tag="1")] - pub member: ::core::option::Option, + pub member: ::core::option::Option, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateMemberForStateRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(enumeration="crate::models::member::MemberState", tag="2")] + pub state: i32, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateMemberForStateResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `UpdateMemberForStateResponse`. +pub mod update_member_for_state_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub member: ::core::option::Option, } } - -pub const SUBJECT_DELETE_MEMBER: &str = const_format::concatcp!(SUBJECT, ".DeleteMember"); -/// subject = bet.beteran.ss.member.DeleteMember #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteMemberRequest { - #[prost(message, optional, tag="1")] - pub client: ::core::option::Option, - #[prost(string, tag="2")] + #[prost(string, tag="1")] pub id: ::prost::alloc::string::String, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteMemberResponse { #[prost(message, optional, tag="1")] - pub error: ::core::option::Option, + pub error: ::core::option::Option, #[prost(message, optional, tag="2")] pub result: ::core::option::Option, } diff --git a/src/c2se/member_bank_account.rs b/src/c2se/member_bank_account.rs new file mode 100644 index 0000000..f394589 --- /dev/null +++ b/src/c2se/member_bank_account.rs @@ -0,0 +1,134 @@ +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateMemberBankAccountRequest { + #[prost(string, tag="1")] + pub member_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub bank_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub account_number: ::prost::alloc::string::String, + #[prost(string, optional, tag="5")] + pub memo: ::core::option::Option<::prost::alloc::string::String>, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateMemberBankAccountResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `CreateMemberBankAccountResponse`. +pub mod create_member_bank_account_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub member_bank_account: ::core::option::Option, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMemberBankAccountsRequest { + #[prost(message, optional, tag="1")] + pub pagination: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub sorts: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag="3")] + pub search: ::core::option::Option, +} +/// Nested message and enum types in `ListMemberBankAccountsRequest`. +pub mod list_member_bank_accounts_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Search { + #[prost(string, optional, tag="1")] + pub member_id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="2")] + pub bank_id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="3")] + pub name_like: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="4")] + pub account_number_like: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="5")] + pub memo_like: ::core::option::Option<::prost::alloc::string::String>, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMemberBankAccountsResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `ListMemberBankAccountsResponse`. +pub mod list_member_bank_accounts_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, repeated, tag="1")] + pub member_bank_accounts: ::prost::alloc::vec::Vec, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetMemberBankAccountRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetMemberBankAccountResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `GetMemberBankAccountResponse`. +pub mod get_member_bank_account_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub member_bank_account: ::core::option::Option, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateMemberBankAccountRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub bank_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub account_number: ::prost::alloc::string::String, + #[prost(string, optional, tag="5")] + pub memo: ::core::option::Option<::prost::alloc::string::String>, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateMemberBankAccountResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `UpdateMemberBankAccountResponse`. +pub mod update_member_bank_account_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub member_bank_account: ::core::option::Option, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteMemberBankAccountRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteMemberBankAccountResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `DeleteMemberBankAccountResponse`. +pub mod delete_member_bank_account_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + } +} diff --git a/src/c2se/member_bank_deposit.rs b/src/c2se/member_bank_deposit.rs new file mode 100644 index 0000000..52cf453 --- /dev/null +++ b/src/c2se/member_bank_deposit.rs @@ -0,0 +1,150 @@ +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateMemberBankDepositRequest { + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(uint32, tag="2")] + pub amount: u32, + #[prost(string, optional, tag="3")] + pub memo: ::core::option::Option<::prost::alloc::string::String>, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateMemberBankDepositResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `CreateMemberBankDepositResponse`. +pub mod create_member_bank_deposit_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub member_bank_deposit: ::core::option::Option, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMemberBankDepositsRequest { + #[prost(message, optional, tag="1")] + pub pagination: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub sorts: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag="3")] + pub search: ::core::option::Option, +} +/// Nested message and enum types in `ListMemberBankDepositsRequest`. +pub mod list_member_bank_deposits_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Search { + #[prost(string, optional, tag="1")] + pub member_id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="2")] + pub name_like: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="3")] + pub amount: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="4")] + pub memo_like: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="5")] + pub state: ::core::option::Option<::prost::alloc::string::String>, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMemberBankDepositsResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `ListMemberBankDepositsResponse`. +pub mod list_member_bank_deposits_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, repeated, tag="1")] + pub member_bank_deposits: ::prost::alloc::vec::Vec, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetMemberBankDepositRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetMemberBankDepositResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `GetMemberBankDepositResponse`. +pub mod get_member_bank_deposit_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub member_bank_deposit: ::core::option::Option, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateMemberBankDepositRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub name: ::prost::alloc::string::String, + #[prost(uint32, tag="5")] + pub amount: u32, + #[prost(string, optional, tag="7")] + pub memo: ::core::option::Option<::prost::alloc::string::String>, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateMemberBankDepositResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `UpdateMemberBankDepositResponse`. +pub mod update_member_bank_deposit_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub member_bank_deposit: ::core::option::Option, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateMemberBankDepositForStateRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(enumeration="crate::models::member_bank_deposit::MemberBankDepositState", tag="2")] + pub state: i32, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateMemberBankDepositForStateResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `UpdateMemberBankDepositForStateResponse`. +pub mod update_member_bank_deposit_for_state_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub member_bank_deposit: ::core::option::Option, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteMemberBankDepositRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteMemberBankDepositResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `DeleteMemberBankDepositResponse`. +pub mod delete_member_bank_deposit_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + } +} diff --git a/src/c2se/member_bank_withdraw.rs b/src/c2se/member_bank_withdraw.rs new file mode 100644 index 0000000..0807007 --- /dev/null +++ b/src/c2se/member_bank_withdraw.rs @@ -0,0 +1,166 @@ +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateMemberBankWithdrawRequest { + #[prost(string, tag="1")] + pub bank_name: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub account_number: ::prost::alloc::string::String, + #[prost(uint32, tag="4")] + pub amount: u32, + #[prost(string, tag="5")] + pub password: ::prost::alloc::string::String, + #[prost(string, optional, tag="6")] + pub memo: ::core::option::Option<::prost::alloc::string::String>, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateMemberBankWithdrawResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `CreateMemberBankWithdrawResponse`. +pub mod create_member_bank_withdraw_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub member_bank_withdraw: ::core::option::Option, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMemberBankWithdrawsRequest { + #[prost(message, optional, tag="1")] + pub pagination: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub sorts: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag="3")] + pub search: ::core::option::Option, +} +/// Nested message and enum types in `ListMemberBankWithdrawsRequest`. +pub mod list_member_bank_withdraws_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Search { + #[prost(string, optional, tag="1")] + pub member_id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="2")] + pub bank_name_like: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="3")] + pub name_like: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="4")] + pub account_number_like: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="5")] + pub amount: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="6")] + pub memo_like: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="7")] + pub state: ::core::option::Option<::prost::alloc::string::String>, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMemberBankWithdrawsResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `ListMemberBankWithdrawsResponse`. +pub mod list_member_bank_withdraws_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, repeated, tag="1")] + pub member_bank_withdraws: ::prost::alloc::vec::Vec, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetMemberBankWithdrawRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetMemberBankWithdrawResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `GetMemberBankWithdrawResponse`. +pub mod get_member_bank_withdraw_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub member_bank_withdraw: ::core::option::Option, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateMemberBankWithdrawRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub bank_name: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub account_number: ::prost::alloc::string::String, + #[prost(uint32, tag="5")] + pub amount: u32, + #[prost(string, tag="6")] + pub password: ::prost::alloc::string::String, + #[prost(string, optional, tag="7")] + pub memo: ::core::option::Option<::prost::alloc::string::String>, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateMemberBankWithdrawResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `UpdateMemberBankWithdrawResponse`. +pub mod update_member_bank_withdraw_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub member_bank_withdraw: ::core::option::Option, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateMemberBankWithdrawForStateRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(enumeration="crate::models::member_bank_withdraw::MemberBankWithdrawState", tag="2")] + pub state: i32, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateMemberBankWithdrawForStateResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `UpdateMemberBankWithdrawForStateResponse`. +pub mod update_member_bank_withdraw_for_state_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub member_bank_withdraw: ::core::option::Option, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteMemberBankWithdrawRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteMemberBankWithdrawResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `DeleteMemberBankWithdrawResponse`. +pub mod delete_member_bank_withdraw_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + } +} diff --git a/src/ss/member/member_class.rs b/src/c2se/member_class.rs similarity index 51% rename from src/ss/member/member_class.rs rename to src/c2se/member_class.rs index 8972f6d..fe20a50 100644 --- a/src/ss/member/member_class.rs +++ b/src/c2se/member_class.rs @@ -1,141 +1,110 @@ -use crate::models::core; -use crate::protobuf; - -const SUBJECT: &str = "bet.beteran.ss.member_class"; - - -pub const SUBJECT_CREATE_MEMBER_CLASS: &str = const_format::concatcp!(SUBJECT, ".CreateMemberClass"); -/// subject = bet.beteran.ss.member_class.CreateMemberClass #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateMemberClassRequest { + #[prost(string, optional, tag="1")] + pub parent_id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateMemberClassResponse { #[prost(message, optional, tag="1")] - pub client: ::core::option::Option, + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `CreateMemberClassResponse`. +pub mod create_member_class_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub member_class: ::core::option::Option, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMemberClassesRequest { + #[prost(message, optional, tag="1")] + pub pagination: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub sorts: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag="3")] + pub search: ::core::option::Option, +} +/// Nested message and enum types in `ListMemberClassesRequest`. +pub mod list_member_classes_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Search { + #[prost(string, optional, tag="4")] + pub name_like: ::core::option::Option<::prost::alloc::string::String>, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMemberClassesResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `ListMemberClassesResponse`. +pub mod list_member_classes_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, repeated, tag="1")] + pub member_classes: ::prost::alloc::vec::Vec, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetMemberClassRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetMemberClassResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `GetMemberClassResponse`. +pub mod get_member_class_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub member_class: ::core::option::Option, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateMemberClassRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, #[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, } #[derive(Clone, PartialEq, ::prost::Message)] -pub struct CreateMemberClassResponse { - #[prost(message, optional, tag="1")] - pub error: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub result: ::core::option::Option, -} -/// Nested message and enum types in `CreateMemberClassResponse`. -pub mod create_member_class_response { - use crate::models::member; - - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Result { - #[prost(message, optional, tag="1")] - pub member_class: ::core::option::Option, - } -} - -pub const SUBJECT_LIST_MEMBER_CLASSES: &str = const_format::concatcp!(SUBJECT, ".ListMemberClasses"); -/// subject = bet.beteran.ss.member_class.ListMemberClasses -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ListMemberClassesRequest { - #[prost(message, optional, tag="1")] - pub client: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub pagination: ::core::option::Option, - #[prost(message, repeated, tag="3")] - pub searches: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="4")] - pub sorts: ::prost::alloc::vec::Vec, - #[prost(string, optional, tag="5")] - pub name_like: ::core::option::Option<::prost::alloc::string::String>, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ListMemberClassesResponse { - #[prost(message, optional, tag="1")] - pub error: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub result: ::core::option::Option, -} -/// Nested message and enum types in `ListMemberClassesResponse`. -pub mod list_member_classes_response { - use crate::models::member; - - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Result { - #[prost(message, repeated, tag="1")] - pub member_classes: ::prost::alloc::vec::Vec, - } -} -pub const SUBJECT_GET_MEMBER_CLASS: &str = const_format::concatcp!(SUBJECT, ".GetMemberClass"); -/// subject = bet.beteran.ss.member_class.GetMemberClass -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetMemberClassRequest { - #[prost(message, optional, tag="1")] - pub client: ::core::option::Option, - #[prost(string, tag="2")] - pub id: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetMemberClassResponse { - #[prost(message, optional, tag="1")] - pub error: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub result: ::core::option::Option, -} -/// Nested message and enum types in `GetMemberClassResponse`. -pub mod get_member_class_response { - use crate::models::member; - - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Result { - #[prost(message, optional, tag="1")] - pub member_class: ::core::option::Option, - } -} - -pub const SUBJECT_UPDATE_MEMBER_CLASS: &str = const_format::concatcp!(SUBJECT, ".UpdateMemberClass"); -/// subject = bet.beteran.ss.member_class.UpdateMemberClass -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct UpdateMemberClassRequest { - #[prost(message, optional, tag="1")] - pub client: ::core::option::Option, - #[prost(string, tag="2")] - pub id: ::prost::alloc::string::String, - #[prost(string, optional, tag="3")] - pub parent_id: ::core::option::Option<::prost::alloc::string::String>, - #[prost(string, tag="4")] - pub name: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateMemberClassResponse { #[prost(message, optional, tag="1")] - pub error: ::core::option::Option, + pub error: ::core::option::Option, #[prost(message, optional, tag="2")] pub result: ::core::option::Option, } /// Nested message and enum types in `UpdateMemberClassResponse`. pub mod update_member_class_response { - use crate::models::member; - - #[derive(Clone, PartialEq, ::prost::Message)] + #[derive(Clone, PartialEq, ::prost::Message)] pub struct Result { #[prost(message, optional, tag="1")] - pub member_class: ::core::option::Option, + pub member_class: ::core::option::Option, } } - -pub const SUBJECT_DELETE_MEMBER_CLASS: &str = const_format::concatcp!(SUBJECT, ".DeleteMemberClass"); -/// subject = bet.beteran.ss.member_class.DeleteMemberClass #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteMemberClassRequest { - #[prost(message, optional, tag="1")] - pub client: ::core::option::Option, - #[prost(string, tag="2")] + #[prost(string, tag="1")] pub id: ::prost::alloc::string::String, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteMemberClassResponse { #[prost(message, optional, tag="1")] - pub error: ::core::option::Option, + pub error: ::core::option::Option, #[prost(message, optional, tag="2")] pub result: ::core::option::Option, } diff --git a/src/ss/member/member_level.rs b/src/c2se/member_level.rs similarity index 50% rename from src/ss/member/member_level.rs rename to src/c2se/member_level.rs index 2d1bbb2..00685fa 100644 --- a/src/ss/member/member_level.rs +++ b/src/c2se/member_level.rs @@ -1,141 +1,110 @@ -use crate::models::core; -use crate::protobuf; - -const SUBJECT: &str = "bet.beteran.ss.member_level"; - - -pub const SUBJECT_CREATE_MEMBER_LEVEL: &str = const_format::concatcp!(SUBJECT, ".CreateMemberLevel"); -/// subject = bet.beteran.ss.member_level.CreateMemberLevel #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateMemberLevelRequest { + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(uint32, tag="2")] + pub sort_order: u32, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateMemberLevelResponse { #[prost(message, optional, tag="1")] - pub client: ::core::option::Option, + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `CreateMemberLevelResponse`. +pub mod create_member_level_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub member_level: ::core::option::Option, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMemberLevelsRequest { + #[prost(message, optional, tag="1")] + pub pagination: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub sorts: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag="3")] + pub search: ::core::option::Option, +} +/// Nested message and enum types in `ListMemberLevelsRequest`. +pub mod list_member_levels_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Search { + #[prost(string, optional, tag="1")] + pub name_like: ::core::option::Option<::prost::alloc::string::String>, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMemberLevelsResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `ListMemberLevelsResponse`. +pub mod list_member_levels_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, repeated, tag="1")] + pub member_levels: ::prost::alloc::vec::Vec, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetMemberLevelRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetMemberLevelResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `GetMemberLevelResponse`. +pub mod get_member_level_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub member_level: ::core::option::Option, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateMemberLevelRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, #[prost(string, tag="2")] pub name: ::prost::alloc::string::String, #[prost(uint32, tag="3")] pub sort_order: u32, } #[derive(Clone, PartialEq, ::prost::Message)] -pub struct CreateMemberLevelResponse { - #[prost(message, optional, tag="1")] - pub error: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub result: ::core::option::Option, -} -/// Nested message and enum types in `CreateMemberLevelResponse`. -pub mod create_member_level_response { - use crate::models::member; - - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Result { - #[prost(message, optional, tag="1")] - pub member_level: ::core::option::Option, - } -} - -pub const SUBJECT_LIST_MEMBER_LEVELS: &str = const_format::concatcp!(SUBJECT, ".ListMemberLevels"); -/// subject = bet.beteran.ss.member_level.ListMemberLevels -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ListMemberLevelsRequest { - #[prost(message, optional, tag="1")] - pub client: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub pagination: ::core::option::Option, - #[prost(message, repeated, tag="3")] - pub searches: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="4")] - pub sorts: ::prost::alloc::vec::Vec, - #[prost(string, optional, tag="5")] - pub name_like: ::core::option::Option<::prost::alloc::string::String>, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ListMemberLevelsResponse { - #[prost(message, optional, tag="1")] - pub error: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub result: ::core::option::Option, -} -/// Nested message and enum types in `ListMemberLevelsResponse`. -pub mod list_member_levels_response { - use crate::models::member; - - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Result { - #[prost(message, repeated, tag="1")] - pub member_levels: ::prost::alloc::vec::Vec, - } -} -pub const SUBJECT_GET_MEMBER_LEVEL: &str = const_format::concatcp!(SUBJECT, ".GetMemberLevel"); -/// subject = bet.beteran.ss.member_level.GetMemberLevel -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetMemberLevelRequest { - #[prost(message, optional, tag="1")] - pub client: ::core::option::Option, - #[prost(string, tag="2")] - pub id: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetMemberLevelResponse { - #[prost(message, optional, tag="1")] - pub error: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub result: ::core::option::Option, -} -/// Nested message and enum types in `GetMemberLevelResponse`. -pub mod get_member_level_response { - use crate::models::member; - - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Result { - #[prost(message, optional, tag="1")] - pub member_level: ::core::option::Option, - } -} - -pub const SUBJECT_UPDATE_MEMBER_LEVEL: &str = const_format::concatcp!(SUBJECT, ".UpdateMemberLevel"); -/// subject = bet.beteran.ss.member_level.UpdateMemberLevel -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct UpdateMemberLevelRequest { - #[prost(message, optional, tag="1")] - pub client: ::core::option::Option, - #[prost(string, tag="2")] - pub id: ::prost::alloc::string::String, - #[prost(string, tag="3")] - pub name: ::prost::alloc::string::String, - #[prost(uint32, tag="4")] - pub sort_order: u32, -} -#[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateMemberLevelResponse { #[prost(message, optional, tag="1")] - pub error: ::core::option::Option, + pub error: ::core::option::Option, #[prost(message, optional, tag="2")] pub result: ::core::option::Option, } /// Nested message and enum types in `UpdateMemberLevelResponse`. pub mod update_member_level_response { - use crate::models::member; - - #[derive(Clone, PartialEq, ::prost::Message)] + #[derive(Clone, PartialEq, ::prost::Message)] pub struct Result { #[prost(message, optional, tag="1")] - pub member_level: ::core::option::Option, + pub member_level: ::core::option::Option, } } - -pub const SUBJECT_DELETE_MEMBER_LEVEL: &str = const_format::concatcp!(SUBJECT, ".DeleteMemberLevel"); -/// subject = bet.beteran.ss.member_level.DeleteMemberLevel #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteMemberLevelRequest { - #[prost(message, optional, tag="1")] - pub client: ::core::option::Option, - #[prost(string, tag="2")] + #[prost(string, tag="1")] pub id: ::prost::alloc::string::String, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteMemberLevelResponse { #[prost(message, optional, tag="1")] - pub error: ::core::option::Option, + pub error: ::core::option::Option, #[prost(message, optional, tag="2")] pub result: ::core::option::Option, } diff --git a/src/c2se/mod.rs b/src/c2se/mod.rs index 9ad44dc..6aff3c8 100644 --- a/src/c2se/mod.rs +++ b/src/c2se/mod.rs @@ -1,11 +1,9 @@ -//! -//! - -/// -pub mod backend; -/// -pub mod common; -/// -pub mod core; -/// -pub mod frontend; +pub mod bank; +pub mod identity; +pub mod member_bank_account; +pub mod member_bank_deposit; +pub mod member_bank_withdraw; +pub mod member_class; +pub mod member_level; +pub mod member; +pub mod site; diff --git a/src/ss/domain/site.rs b/src/c2se/site.rs similarity index 52% rename from src/ss/domain/site.rs rename to src/c2se/site.rs index e2b24f7..98fff3b 100644 --- a/src/ss/domain/site.rs +++ b/src/c2se/site.rs @@ -1,58 +1,101 @@ -use crate::protobuf::pagination; -use crate::protobuf::rpc; -use crate::models::core; - -const SUBJECT: &str = "bet.beteran.ss.domain.site"; - -pub const SUBJECT_LIST_SITES: &str = const_format::concatcp!(SUBJECT, ".ListSites"); -/// subject = bet.beteran.ss.domain.site.ListSites; +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateSiteRequest { + #[prost(string, tag="1")] + pub url: ::prost::alloc::string::String, + #[prost(string, optional, tag="2")] + pub name: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="3")] + pub path: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bool, tag="4")] + pub show: bool, + #[prost(bool, tag="5")] + pub can_use: bool, + #[prost(string, optional, tag="6")] + pub memo: ::core::option::Option<::prost::alloc::string::String>, + #[prost(uint64, optional, tag="7")] + pub expires_at: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateSiteResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `CreateSiteResponse`. +pub mod create_site_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub site: ::core::option::Option, + } +} #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListSitesRequest { #[prost(message, optional, tag="1")] - pub client: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub pagination: ::core::option::Option, - #[prost(message, repeated, tag="3")] - pub searches: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="4")] - pub sorts: ::prost::alloc::vec::Vec, - #[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, - #[prost(bool, optional, tag="9")] - pub can_use: ::core::option::Option, - #[prost(string, optional, tag="10")] - pub memo_like: ::core::option::Option<::prost::alloc::string::String>, + pub pagination: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub sorts: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag="3")] + pub search: ::core::option::Option, +} +/// Nested message and enum types in `ListSitesRequest`. +pub mod list_sites_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Search { + #[prost(string, optional, tag="1")] + pub url_like: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="2")] + pub name_like: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="3")] + pub path_like: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bool, optional, tag="4")] + pub show: ::core::option::Option, + #[prost(bool, optional, tag="5")] + pub can_use: ::core::option::Option, + #[prost(string, optional, tag="6")] + pub memo_like: ::core::option::Option<::prost::alloc::string::String>, + } } #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListSitesResponse { #[prost(message, optional, tag="1")] - pub error: ::core::option::Option, + pub error: ::core::option::Option, #[prost(message, optional, tag="2")] pub result: ::core::option::Option, } /// Nested message and enum types in `ListSitesResponse`. pub mod list_sites_response { - use crate::models::domain; - - #[derive(Clone, PartialEq, ::prost::Message)] + #[derive(Clone, PartialEq, ::prost::Message)] pub struct Result { #[prost(message, repeated, tag="1")] - pub sites: ::prost::alloc::vec::Vec, + pub sites: ::prost::alloc::vec::Vec, } } - -pub const SUBJECT_CREATE_SITE: &str = const_format::concatcp!(SUBJECT, ".CreateSite"); -/// subject = bet.beteran.ss.domain.site.CreateSite; #[derive(Clone, PartialEq, ::prost::Message)] -pub struct CreateSiteRequest { +pub struct GetSiteRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetSiteResponse { #[prost(message, optional, tag="1")] - pub client: ::core::option::Option, + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `GetSiteResponse`. +pub mod get_site_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub site: ::core::option::Option, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateSiteRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, #[prost(string, tag="2")] pub url: ::prost::alloc::string::String, #[prost(string, optional, tag="3")] @@ -69,78 +112,29 @@ pub struct CreateSiteRequest { pub expires_at: ::core::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] -pub struct CreateSiteResponse { - #[prost(message, optional, tag="1")] - pub error: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub result: ::core::option::Option, -} -/// Nested message and enum types in `CreateSiteResponse`. -pub mod create_site_response { - use crate::models::domain; - - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Result { - #[prost(message, optional, tag="1")] - pub site: ::core::option::Option, - } -} - -pub const SUBJECT_UPDATE_SITE: &str = const_format::concatcp!(SUBJECT, ".UpdateSite"); -/// subject = bet.beteran.ss.domain.site.UpdateSite -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct UpdateSiteRequest { - #[prost(message, optional, tag="1")] - pub client: ::core::option::Option, - #[prost(string, tag="2")] - pub id: ::prost::alloc::string::String, - #[prost(string, tag="3")] - pub url: ::prost::alloc::string::String, - #[prost(string, optional, tag="4")] - pub name: ::core::option::Option<::prost::alloc::string::String>, - #[prost(string, optional, tag="5")] - pub path: ::core::option::Option<::prost::alloc::string::String>, - #[prost(bool, tag="6")] - pub show: bool, - #[prost(bool, tag="7")] - pub can_use: bool, - #[prost(string, optional, tag="8")] - pub memo: ::core::option::Option<::prost::alloc::string::String>, - #[prost(uint64, optional, tag="9")] - pub expires_at: ::core::option::Option, -} -#[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateSiteResponse { #[prost(message, optional, tag="1")] - pub error: ::core::option::Option, + pub error: ::core::option::Option, #[prost(message, optional, tag="2")] pub result: ::core::option::Option, } /// Nested message and enum types in `UpdateSiteResponse`. pub mod update_site_response { - use crate::models::domain; - - #[derive(Clone, PartialEq, ::prost::Message)] + #[derive(Clone, PartialEq, ::prost::Message)] pub struct Result { #[prost(message, optional, tag="1")] - pub site: ::core::option::Option, + pub site: ::core::option::Option, } } - - -pub const SUBJECT_DELETE_SITE: &str = const_format::concatcp!(SUBJECT, ".DeleteSite"); -/// subject = bet.beteran.ss.domain.site.DeleteSite #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteSiteRequest { - #[prost(message, optional, tag="1")] - pub client: ::core::option::Option, - #[prost(string, tag="2")] + #[prost(string, tag="1")] pub id: ::prost::alloc::string::String, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteSiteResponse { #[prost(message, optional, tag="1")] - pub error: ::core::option::Option, + pub error: ::core::option::Option, #[prost(message, optional, tag="2")] pub result: ::core::option::Option, } diff --git a/src/lib.rs b/src/lib.rs index 71d926e..710d623 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -8,5 +8,4 @@ pub mod c2se; pub mod models; pub mod protobuf; -pub mod se2c; pub mod ss; diff --git a/src/models/account.rs b/src/models/bank.rs similarity index 78% rename from src/models/account.rs rename to src/models/bank.rs index 81715ff..8236dca 100644 --- a/src/models/account.rs +++ b/src/models/bank.rs @@ -5,13 +5,15 @@ pub struct Bank { #[prost(string, tag="2")] pub name: ::prost::alloc::string::String, #[prost(bool, tag="3")] - pub show: bool, + pub sort_order: bool, #[prost(bool, tag="4")] + pub show: bool, + #[prost(bool, tag="5")] pub can_use: bool, - #[prost(string, optional, tag="5")] + #[prost(string, optional, tag="6")] pub memo: ::core::option::Option<::prost::alloc::string::String>, - #[prost(uint64, tag="6")] - pub created_at: u64, #[prost(uint64, tag="7")] + pub created_at: u64, + #[prost(uint64, tag="8")] pub updated_at: u64, } diff --git a/src/models/core/network.rs b/src/models/core/network.rs index 5c1cd47..2417ebc 100644 --- a/src/models/core/network.rs +++ b/src/models/core/network.rs @@ -1,11 +1,9 @@ -use serde::{Deserialize, Serialize}; - -#[derive(Clone, PartialEq, ::prost::Message, Serialize, Deserialize)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct Client { - #[prost(string, tag = "1")] - pub client_ip: ::prost::alloc::string::String, - #[prost(string, optional, tag = "2")] - pub site_url: ::core::option::Option<::prost::alloc::string::String>, - #[prost(string, optional, tag = "3")] - pub access_token: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, tag="1")] + pub client_ip: ::prost::alloc::string::String, + #[prost(string, optional, tag="2")] + pub site_url: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="3")] + pub access_token: ::core::option::Option<::prost::alloc::string::String>, } diff --git a/src/models/member.rs b/src/models/member.rs index b7a8469..927afcd 100644 --- a/src/models/member.rs +++ b/src/models/member.rs @@ -1,30 +1,4 @@ #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MemberClass { - #[prost(string, tag = "1")] - pub id: ::prost::alloc::string::String, - #[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")] - pub created_at: u64, - #[prost(uint64, tag = "5")] - pub updated_at: u64, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MemberLevel { - #[prost(string, tag = "1")] - pub id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub name: ::prost::alloc::string::String, - #[prost(uint32, tag="3")] - pub sort_order: u32, - #[prost(uint64, tag = "4")] - pub created_at: u64, - #[prost(uint64, tag = "5")] - pub updated_at: u64, -} -#[derive(Clone, PartialEq, ::prost::Message)] pub struct Member { #[prost(string, tag="1")] pub id: ::prost::alloc::string::String, @@ -64,11 +38,11 @@ pub struct MemberModel { #[prost(string, tag="1")] pub id: ::prost::alloc::string::String, #[prost(message, optional, tag="2")] - pub site: ::core::option::Option, + pub site: ::core::option::Option, #[prost(message, optional, tag="3")] - pub member_class: ::core::option::Option, + pub member_class: ::core::option::Option, #[prost(message, optional, tag="4")] - pub member_level: ::core::option::Option, + pub member_level: ::core::option::Option, #[prost(message, optional, tag="5")] pub referrer_member: ::core::option::Option, #[prost(uint64, tag="6")] @@ -97,26 +71,11 @@ pub struct MemberModel { #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum MemberState { - None = 0, - Normal = 1, - Pending = 2, - Withdrawal = 3, - Dormancy = 4, - Blacklist = 5, - Suspended = 6, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MemberSession { - #[prost(string, tag = "1")] - pub id: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub member: ::core::option::Option, - #[prost(string, tag = "3")] - pub data: ::prost::alloc::string::String, - #[prost(uint64, tag = "4")] - pub last_accessed_at: u64, - #[prost(uint64, tag = "5")] - pub expires_at: u64, - #[prost(uint64, tag = "6")] - pub created_at: u64, + None = 0, + Normal = 1, + Pending = 2, + Withdrawal = 3, + Dormancy = 4, + Blacklist = 5, + Suspended = 6, } diff --git a/src/models/member_bank_account.rs b/src/models/member_bank_account.rs new file mode 100644 index 0000000..24b5d3a --- /dev/null +++ b/src/models/member_bank_account.rs @@ -0,0 +1,19 @@ +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MemberBankAccount { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub member_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub bank_id: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub account_number: ::prost::alloc::string::String, + #[prost(string, optional, tag="6")] + pub memo: ::core::option::Option<::prost::alloc::string::String>, + #[prost(uint64, tag="7")] + pub created_at: u64, + #[prost(uint64, tag="8")] + pub updated_at: u64, +} diff --git a/src/models/member_bank_deposit.rs b/src/models/member_bank_deposit.rs new file mode 100644 index 0000000..71f9166 --- /dev/null +++ b/src/models/member_bank_deposit.rs @@ -0,0 +1,28 @@ +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MemberBankDeposit { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub member_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub name: ::prost::alloc::string::String, + #[prost(uint32, tag="4")] + pub amount: u32, + #[prost(string, optional, tag="5")] + pub memo: ::core::option::Option<::prost::alloc::string::String>, + #[prost(enumeration="MemberBankDepositState", tag="6")] + pub state: i32, + #[prost(uint64, tag="7")] + pub state_changed_at: u64, + #[prost(uint64, tag="8")] + pub created_at: u64, + #[prost(uint64, tag="9")] + pub updated_at: u64, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum MemberBankDepositState { + None = 0, + Application = 1, + Complete = 2, +} diff --git a/src/models/member_bank_withdraw.rs b/src/models/member_bank_withdraw.rs new file mode 100644 index 0000000..3f9660e --- /dev/null +++ b/src/models/member_bank_withdraw.rs @@ -0,0 +1,34 @@ +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MemberBankWithdraw { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub member_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub bank_name: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub account_number: ::prost::alloc::string::String, + #[prost(uint32, tag="6")] + pub amount: u32, + #[prost(string, tag="7")] + pub password: ::prost::alloc::string::String, + #[prost(string, optional, tag="8")] + pub memo: ::core::option::Option<::prost::alloc::string::String>, + #[prost(enumeration="MemberBankWithdrawState", tag="9")] + pub state: i32, + #[prost(uint64, tag="10")] + pub state_changed_at: u64, + #[prost(uint64, tag="11")] + pub created_at: u64, + #[prost(uint64, tag="12")] + pub updated_at: u64, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum MemberBankWithdrawState { + None = 0, + Application = 1, + Complete = 2, +} diff --git a/src/models/member_class.rs b/src/models/member_class.rs new file mode 100644 index 0000000..388e802 --- /dev/null +++ b/src/models/member_class.rs @@ -0,0 +1,13 @@ +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MemberClass { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[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")] + pub created_at: u64, + #[prost(uint64, tag="5")] + pub updated_at: u64, +} diff --git a/src/models/member_level.rs b/src/models/member_level.rs new file mode 100644 index 0000000..798f0ad --- /dev/null +++ b/src/models/member_level.rs @@ -0,0 +1,13 @@ +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MemberLevel { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + #[prost(uint32, tag="3")] + pub sort_order: u32, + #[prost(uint64, tag="4")] + pub created_at: u64, + #[prost(uint64, tag="5")] + pub updated_at: u64, +} diff --git a/src/models/member_permission.rs b/src/models/member_permission.rs new file mode 100644 index 0000000..e69de29 diff --git a/src/models/member_role.rs b/src/models/member_role.rs new file mode 100644 index 0000000..e69de29 diff --git a/src/models/member_session.rs b/src/models/member_session.rs new file mode 100644 index 0000000..d17da5a --- /dev/null +++ b/src/models/member_session.rs @@ -0,0 +1,15 @@ +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MemberSession { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub member: ::core::option::Option, + #[prost(string, tag="3")] + pub data: ::prost::alloc::string::String, + #[prost(uint64, tag="4")] + pub last_accessed_at: u64, + #[prost(uint64, tag="5")] + pub expires_at: u64, + #[prost(uint64, tag="6")] + pub created_at: u64, +} diff --git a/src/models/mod.rs b/src/models/mod.rs index ea00b9b..8a3dbd6 100644 --- a/src/models/mod.rs +++ b/src/models/mod.rs @@ -1,5 +1,15 @@ pub mod core; -pub mod account; -pub mod domain; +pub mod bank; +pub mod member_bank_account; +pub mod member_bank_deposit; +pub mod member_bank_withdraw; +pub mod member_class; +pub mod member_level; +pub mod member_permission; +pub mod member_role; +pub mod member_session; pub mod member; -pub mod rbac; +pub mod resource_action; +pub mod resource; +pub mod role; +pub mod site; diff --git a/src/models/rbac.rs b/src/models/rbac.rs deleted file mode 100644 index 4b74ae6..0000000 --- a/src/models/rbac.rs +++ /dev/null @@ -1,57 +0,0 @@ -#[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>, - #[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, - #[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>, - #[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, -} diff --git a/src/models/resource.rs b/src/models/resource.rs new file mode 100644 index 0000000..22735c6 --- /dev/null +++ b/src/models/resource.rs @@ -0,0 +1,19 @@ +#[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>, + #[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, +} diff --git a/src/models/resource_action.rs b/src/models/resource_action.rs new file mode 100644 index 0000000..3f98167 --- /dev/null +++ b/src/models/resource_action.rs @@ -0,0 +1,19 @@ +#[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, + #[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, +} diff --git a/src/models/role.rs b/src/models/role.rs new file mode 100644 index 0000000..f3576cf --- /dev/null +++ b/src/models/role.rs @@ -0,0 +1,19 @@ +#[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>, + #[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, +} diff --git a/src/models/domain.rs b/src/models/site.rs similarity index 100% rename from src/models/domain.rs rename to src/models/site.rs diff --git a/src/protobuf/mod.rs b/src/protobuf/mod.rs index e536123..ac90473 100644 --- a/src/protobuf/mod.rs +++ b/src/protobuf/mod.rs @@ -1,2 +1,2 @@ pub mod pagination; -pub mod rpc; +pub mod rpc; \ No newline at end of file diff --git a/src/protobuf/pagination.rs b/src/protobuf/pagination.rs index ace17d6..6b7ddff 100644 --- a/src/protobuf/pagination.rs +++ b/src/protobuf/pagination.rs @@ -6,13 +6,6 @@ pub struct Pagination { pub page_size: ::core::option::Option, } #[derive(Clone, PartialEq, ::prost::Message)] -pub struct Search { - #[prost(string, tag="1")] - pub key: ::prost::alloc::string::String, - #[prost(string, tag="2")] - pub value: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] pub struct Sort { #[prost(string, tag="1")] pub by: ::prost::alloc::string::String, diff --git a/src/protobuf/rpc.rs b/src/protobuf/rpc.rs index d0dc780..7766734 100644 --- a/src/protobuf/rpc.rs +++ b/src/protobuf/rpc.rs @@ -1,175 +1,178 @@ use std::fmt; + #[derive(Clone, PartialEq, ::prost::Message)] pub struct Error { - #[prost(int32, tag = "1")] - pub code: i32, - #[prost(string, tag = "2")] - pub message: ::prost::alloc::string::String, - #[prost(bytes = "vec", optional, tag = "3")] - pub data: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(int32, tag="1")] + pub code: i32, + #[prost(string, tag="2")] + pub message: ::prost::alloc::string::String, + #[prost(bytes="vec", optional, tag="3")] + pub data: ::core::option::Option<::prost::alloc::vec::Vec>, } impl fmt::Display for Error { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "Error code: {}, message: {:?}, data: {:?}", - self.code, self.message, self.data - ) + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!( + f, + "Error code: {}, message: {:?}, data: {:?}", + self.code, self.message, self.data + ) + } } -} -impl Error { - pub const PARSE: i32 = -32700; - pub const INVALID_REQUEST: i32 = -32600; - pub const INVALID_PARAMS: i32 = -32602; - pub const INTERNAL: i32 = -32603; - pub const SERVER_00: i32 = -32000; - pub const SERVER_01: i32 = -32001; - pub const SERVER_02: i32 = -32002; - pub const SERVER_03: i32 = -32003; - pub const SERVER_04: i32 = -32004; - pub const SERVER_05: i32 = -32005; - pub const SERVER_06: i32 = -32006; - pub const SERVER_07: i32 = -32007; - pub const SERVER_08: i32 = -32008; - pub const SERVER_09: i32 = -32009; - pub const SERVER_10: i32 = -32010; - pub const SERVER_11: i32 = -32011; - pub const SERVER_12: i32 = -32012; - pub const SERVER_13: i32 = -32013; - pub const SERVER_14: i32 = -32014; - pub const SERVER_15: i32 = -32015; - pub const SERVER_16: i32 = -32016; - pub const SERVER_17: i32 = -32017; - pub const SERVER_18: i32 = -32018; - pub const SERVER_19: i32 = -32019; - pub const SERVER_20: i32 = -32020; - pub const SERVER_21: i32 = -32021; - pub const SERVER_22: i32 = -32022; - pub const SERVER_23: i32 = -32023; - pub const SERVER_24: i32 = -32024; - pub const SERVER_25: i32 = -32025; - pub const SERVER_26: i32 = -32026; - pub const SERVER_27: i32 = -32027; - pub const SERVER_28: i32 = -32028; - pub const SERVER_29: i32 = -32029; - pub const SERVER_30: i32 = -32030; - pub const SERVER_31: i32 = -32031; - pub const SERVER_32: i32 = -32032; - pub const SERVER_33: i32 = -32033; - pub const SERVER_34: i32 = -32034; - pub const SERVER_35: i32 = -32035; - pub const SERVER_36: i32 = -32036; - pub const SERVER_37: i32 = -32037; - pub const SERVER_38: i32 = -32038; - pub const SERVER_39: i32 = -32039; - pub const SERVER_40: i32 = -32040; - pub const SERVER_41: i32 = -32041; - pub const SERVER_42: i32 = -32042; - pub const SERVER_43: i32 = -32043; - pub const SERVER_44: i32 = -32044; - pub const SERVER_45: i32 = -32045; - pub const SERVER_46: i32 = -32046; - pub const SERVER_47: i32 = -32047; - pub const SERVER_48: i32 = -32048; - pub const SERVER_49: i32 = -32049; - pub const SERVER_50: i32 = -32050; - pub const SERVER_51: i32 = -32051; - pub const SERVER_52: i32 = -32052; - pub const SERVER_53: i32 = -32053; - pub const SERVER_54: i32 = -32054; - pub const SERVER_55: i32 = -32055; - pub const SERVER_56: i32 = -32056; - pub const SERVER_57: i32 = -32057; - pub const SERVER_58: i32 = -32058; - pub const SERVER_59: i32 = -32059; - pub const SERVER_60: i32 = -32060; - pub const SERVER_61: i32 = -32061; - pub const SERVER_62: i32 = -32062; - pub const SERVER_63: i32 = -32063; - pub const SERVER_64: i32 = -32064; - pub const SERVER_65: i32 = -32065; - pub const SERVER_66: i32 = -32066; - pub const SERVER_67: i32 = -32067; - pub const SERVER_68: i32 = -32068; - pub const SERVER_69: i32 = -32069; - pub const SERVER_70: i32 = -32070; - pub const SERVER_71: i32 = -32071; - pub const SERVER_72: i32 = -32072; - pub const SERVER_73: i32 = -32073; - pub const SERVER_74: i32 = -32074; - pub const SERVER_75: i32 = -32075; - pub const SERVER_76: i32 = -32076; - pub const SERVER_77: i32 = -32077; - pub const SERVER_78: i32 = -32078; - pub const SERVER_79: i32 = -32079; - pub const SERVER_80: i32 = -32080; - pub const SERVER_81: i32 = -32081; - pub const SERVER_82: i32 = -32082; - pub const SERVER_83: i32 = -32083; - pub const SERVER_84: i32 = -32084; - pub const SERVER_85: i32 = -32085; - pub const SERVER_86: i32 = -32086; - pub const SERVER_87: i32 = -32087; - pub const SERVER_88: i32 = -32088; - pub const SERVER_89: i32 = -32089; - pub const SERVER_90: i32 = -32090; - pub const SERVER_91: i32 = -32091; - pub const SERVER_92: i32 = -32092; - pub const SERVER_93: i32 = -32093; - pub const SERVER_94: i32 = -32094; - pub const SERVER_95: i32 = -32095; - pub const SERVER_96: i32 = -32096; - pub const SERVER_97: i32 = -32097; - pub const SERVER_98: i32 = -32098; - pub const SERVER_99: i32 = -32099; -} + impl Error { + pub const PARSE: i32 = -32700; + pub const INVALID_REQUEST: i32 = -32600; + pub const INVALID_PARAMS: i32 = -32602; + pub const INTERNAL: i32 = -32603; + pub const SERVER_00: i32 = -32000; + pub const SERVER_01: i32 = -32001; + pub const SERVER_02: i32 = -32002; + pub const SERVER_03: i32 = -32003; + pub const SERVER_04: i32 = -32004; + pub const SERVER_05: i32 = -32005; + pub const SERVER_06: i32 = -32006; + pub const SERVER_07: i32 = -32007; + pub const SERVER_08: i32 = -32008; + pub const SERVER_09: i32 = -32009; + pub const SERVER_10: i32 = -32010; + pub const SERVER_11: i32 = -32011; + pub const SERVER_12: i32 = -32012; + pub const SERVER_13: i32 = -32013; + pub const SERVER_14: i32 = -32014; + pub const SERVER_15: i32 = -32015; + pub const SERVER_16: i32 = -32016; + pub const SERVER_17: i32 = -32017; + pub const SERVER_18: i32 = -32018; + pub const SERVER_19: i32 = -32019; + pub const SERVER_20: i32 = -32020; + pub const SERVER_21: i32 = -32021; + pub const SERVER_22: i32 = -32022; + pub const SERVER_23: i32 = -32023; + pub const SERVER_24: i32 = -32024; + pub const SERVER_25: i32 = -32025; + pub const SERVER_26: i32 = -32026; + pub const SERVER_27: i32 = -32027; + pub const SERVER_28: i32 = -32028; + pub const SERVER_29: i32 = -32029; + pub const SERVER_30: i32 = -32030; + pub const SERVER_31: i32 = -32031; + pub const SERVER_32: i32 = -32032; + pub const SERVER_33: i32 = -32033; + pub const SERVER_34: i32 = -32034; + pub const SERVER_35: i32 = -32035; + pub const SERVER_36: i32 = -32036; + pub const SERVER_37: i32 = -32037; + pub const SERVER_38: i32 = -32038; + pub const SERVER_39: i32 = -32039; + pub const SERVER_40: i32 = -32040; + pub const SERVER_41: i32 = -32041; + pub const SERVER_42: i32 = -32042; + pub const SERVER_43: i32 = -32043; + pub const SERVER_44: i32 = -32044; + pub const SERVER_45: i32 = -32045; + pub const SERVER_46: i32 = -32046; + pub const SERVER_47: i32 = -32047; + pub const SERVER_48: i32 = -32048; + pub const SERVER_49: i32 = -32049; + pub const SERVER_50: i32 = -32050; + pub const SERVER_51: i32 = -32051; + pub const SERVER_52: i32 = -32052; + pub const SERVER_53: i32 = -32053; + pub const SERVER_54: i32 = -32054; + pub const SERVER_55: i32 = -32055; + pub const SERVER_56: i32 = -32056; + pub const SERVER_57: i32 = -32057; + pub const SERVER_58: i32 = -32058; + pub const SERVER_59: i32 = -32059; + pub const SERVER_60: i32 = -32060; + pub const SERVER_61: i32 = -32061; + pub const SERVER_62: i32 = -32062; + pub const SERVER_63: i32 = -32063; + pub const SERVER_64: i32 = -32064; + pub const SERVER_65: i32 = -32065; + pub const SERVER_66: i32 = -32066; + pub const SERVER_67: i32 = -32067; + pub const SERVER_68: i32 = -32068; + pub const SERVER_69: i32 = -32069; + pub const SERVER_70: i32 = -32070; + pub const SERVER_71: i32 = -32071; + pub const SERVER_72: i32 = -32072; + pub const SERVER_73: i32 = -32073; + pub const SERVER_74: i32 = -32074; + pub const SERVER_75: i32 = -32075; + pub const SERVER_76: i32 = -32076; + pub const SERVER_77: i32 = -32077; + pub const SERVER_78: i32 = -32078; + pub const SERVER_79: i32 = -32079; + pub const SERVER_80: i32 = -32080; + pub const SERVER_81: i32 = -32081; + pub const SERVER_82: i32 = -32082; + pub const SERVER_83: i32 = -32083; + pub const SERVER_84: i32 = -32084; + pub const SERVER_85: i32 = -32085; + pub const SERVER_86: i32 = -32086; + pub const SERVER_87: i32 = -32087; + pub const SERVER_88: i32 = -32088; + pub const SERVER_89: i32 = -32089; + pub const SERVER_90: i32 = -32090; + pub const SERVER_91: i32 = -32091; + pub const SERVER_92: i32 = -32092; + pub const SERVER_93: i32 = -32093; + pub const SERVER_94: i32 = -32094; + pub const SERVER_95: i32 = -32095; + pub const SERVER_96: i32 = -32096; + pub const SERVER_97: i32 = -32097; + pub const SERVER_98: i32 = -32098; + pub const SERVER_99: i32 = -32099; + } + #[derive(Clone, PartialEq, ::prost::Message)] pub struct InvalidParamsDetail { - #[prost(string, tag = "1")] - pub location: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub param: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub value: ::prost::alloc::string::String, - #[prost(enumeration = "InvalidParamsType", tag = "4")] - pub error_type: i32, - #[prost(string, tag = "5")] - pub message: ::prost::alloc::string::String, + #[prost(string, tag="1")] + pub location: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub param: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub value: ::prost::alloc::string::String, + #[prost(enumeration="InvalidParamsType", tag="4")] + pub error_type: i32, + #[prost(string, tag="5")] + pub message: ::prost::alloc::string::String, } - #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum InvalidParamsType { - None = 0, - DateTime = 1, - Decimal = 2, - EqualsTo = 3, - Float = 4, - Integer = 5, - Range = 6, - RegEx = 7, - Required = 8, - StringLength = 9, - Url = 10, + None = 0, + DateTime = 1, + Decimal = 2, + EqualsTo = 3, + Float = 4, + Integer = 5, + Range = 6, + RegEx = 7, + Required = 8, + StringLength = 9, + Url = 10, } + impl From for InvalidParamsType { - fn from(s: i32) -> Self { - match s { - s if s == InvalidParamsType::DateTime as i32 => InvalidParamsType::DateTime, - s if s == InvalidParamsType::Decimal as i32 => InvalidParamsType::Decimal, - s if s == InvalidParamsType::EqualsTo as i32 => InvalidParamsType::EqualsTo, - s if s == InvalidParamsType::Float as i32 => InvalidParamsType::Float, - s if s == InvalidParamsType::Integer as i32 => InvalidParamsType::Integer, - s if s == InvalidParamsType::Range as i32 => InvalidParamsType::Range, - s if s == InvalidParamsType::RegEx as i32 => InvalidParamsType::RegEx, - s if s == InvalidParamsType::Required as i32 => InvalidParamsType::Required, - s if s == InvalidParamsType::StringLength as i32 => InvalidParamsType::StringLength, - s if s == InvalidParamsType::Url as i32 => InvalidParamsType::Url, - _ => InvalidParamsType::None, + fn from(s: i32) -> Self { + match s { + s if s == InvalidParamsType::DateTime as i32 => InvalidParamsType::DateTime, + s if s == InvalidParamsType::Decimal as i32 => InvalidParamsType::Decimal, + s if s == InvalidParamsType::EqualsTo as i32 => InvalidParamsType::EqualsTo, + s if s == InvalidParamsType::Float as i32 => InvalidParamsType::Float, + s if s == InvalidParamsType::Integer as i32 => InvalidParamsType::Integer, + s if s == InvalidParamsType::Range as i32 => InvalidParamsType::Range, + s if s == InvalidParamsType::RegEx as i32 => InvalidParamsType::RegEx, + s if s == InvalidParamsType::Required as i32 => InvalidParamsType::Required, + s if s == InvalidParamsType::StringLength as i32 => InvalidParamsType::StringLength, + s if s == InvalidParamsType::Url as i32 => InvalidParamsType::Url, + _ => InvalidParamsType::None, + } } } -} + \ No newline at end of file diff --git a/src/se2c/event_message_attach_files.rs b/src/se2c/event_message_attach_files.rs deleted file mode 100644 index b0dece4..0000000 --- a/src/se2c/event_message_attach_files.rs +++ /dev/null @@ -1,48 +0,0 @@ -use bemily_commons_protobuf_rust::protobuf::bemily::protobuf as bcprpbp; - -pub const SUBJECT: &str = "bemily.messenger.chat.messages.se2c.event.message_attach_files"; - -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MessageAttachFile { - #[prost(string, tag = "1")] - pub id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub room_id: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub message_id: ::prost::alloc::string::String, - #[prost(string, tag = "4")] - pub file_id: ::prost::alloc::string::String, - #[prost(enumeration = "MessageAttachFileType", tag = "5")] - pub attach_file_type: i32, - #[prost(uint64, tag = "6")] - pub created_at: u64, - #[prost(uint64, tag = "7")] - pub updated_at: u64, - #[prost(uint64, optional, tag = "8")] - pub deleted_at: ::core::option::Option, - #[prost(enumeration = "bcprpbp::event::change::ChangeEventType", tag = "9")] - pub change_type: i32, -} - -pub const SUBJECT_CHANGE: &str = const_format::concatcp!(SUBJECT, ".Change"); -/// subject = bemily.messenger.chat.messages.se2c.event.message_attach_files.Change; -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ChangeEvent { - #[prost(string, tag = "1")] - pub identity_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub room_id: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub message_id: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "4")] - pub message_attach_files: ::prost::alloc::vec::Vec, -} -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum MessageAttachFileType { - None = 0, - Image = 1, - Video = 2, - Sound = 3, - File = 4, -} diff --git a/src/se2c/event_messages.rs b/src/se2c/event_messages.rs deleted file mode 100644 index a35ed33..0000000 --- a/src/se2c/event_messages.rs +++ /dev/null @@ -1,53 +0,0 @@ -use bemily_commons_protobuf_rust::protobuf::bemily::protobuf as bcprpbp; - -pub const SUBJECT: &str = "bemily.messenger.chat.messages.se2c.event.messages"; - -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Message { - #[prost(string, tag = "1")] - pub id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub room_id: ::prost::alloc::string::String, - #[prost(string, optional, tag = "3")] - pub sender_id: ::core::option::Option<::prost::alloc::string::String>, - #[prost(enumeration = "MessageType", tag = "4")] - pub message_type: i32, - #[prost(string, tag = "5")] - pub message: ::prost::alloc::string::String, - #[prost(uint64, tag = "6")] - pub seq: u64, - #[prost(uint64, tag = "7")] - pub created_at: u64, - #[prost(uint64, tag = "8")] - pub updated_at: u64, - #[prost(uint64, optional, tag = "9")] - pub deleted_at: ::core::option::Option, - #[prost(enumeration = "bcprpbp::event::change::ChangeEventType", tag = "10")] - pub change_type: i32, -} - -pub const SUBJECT_CHANGE: &str = const_format::concatcp!(SUBJECT, ".Change"); -/// subject = bemily.messenger.chat.messages.se2c.event.messages.Change; -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ChangeEvent { - #[prost(string, tag = "1")] - pub identity_id: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub message: ::core::option::Option, -} -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum MessageType { - None = 0, - Normal = 1, - Mass = 2, - Image = 3, - Video = 4, - Sound = 5, - File = 6, - Emoticon = 7, - Smileme = 8, - Plan = 9, - Combination = 10, - Information = 11, -} diff --git a/src/se2c/mod.rs b/src/se2c/mod.rs deleted file mode 100644 index 46416c2..0000000 --- a/src/se2c/mod.rs +++ /dev/null @@ -1,12 +0,0 @@ -//! -//! - -/// -/// -#[cfg(feature = "se2c_event_messages")] -pub mod event_messages; - -/// -/// -#[cfg(feature = "se2c_event_message_attach_files")] -pub mod event_message_attach_files; diff --git a/src/ss/account/mod.rs b/src/ss/account/mod.rs deleted file mode 100644 index 4cc5aa0..0000000 --- a/src/ss/account/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod bank; \ No newline at end of file diff --git a/src/ss/bank.rs b/src/ss/bank.rs new file mode 100644 index 0000000..9e3c092 --- /dev/null +++ b/src/ss/bank.rs @@ -0,0 +1,198 @@ +const SUBJECT: &str = "bet.beteran.ss.bank"; + +pub const SUBJECT_CREATE_BANK: &str = const_format::concatcp!(SUBJECT, ".CreateBank"); +pub const SUBJECT_LIST_BANKS: &str = const_format::concatcp!(SUBJECT, ".ListBanks"); +pub const SUBJECT_GET_BANK: &str = const_format::concatcp!(SUBJECT, ".GetBank"); +pub const SUBJECT_UPDATE_BANK: &str = const_format::concatcp!(SUBJECT, ".UpdateBank"); +pub const SUBJECT_DELETE_BANK: &str = const_format::concatcp!(SUBJECT, ".DeleteBank"); + + +/// subject = bet.beteran.ss.bank.CreateBank; +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateBankRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `CreateBankRequest`. +pub mod create_bank_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(uint32, tag="2")] + pub sort_order: u32, + #[prost(bool, tag="3")] + pub show: bool, + #[prost(bool, tag="4")] + pub can_use: bool, + #[prost(string, optional, tag="5")] + pub memo: ::core::option::Option<::prost::alloc::string::String>, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateBankResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `CreateBankResponse`. +pub mod create_bank_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub bank: ::core::option::Option, + } +} +/// subject = bet.beteran.ss.bank.ListBanks; +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListBanksRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `ListBanksRequest`. +pub mod list_banks_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(message, optional, tag="1")] + pub pagination: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub sorts: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag="3")] + pub search: ::core::option::Option, + } + /// Nested message and enum types in `Request`. + pub mod request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Search { + #[prost(string, optional, tag="1")] + pub name_like: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bool, optional, tag="2")] + pub show: ::core::option::Option, + #[prost(bool, optional, tag="3")] + pub can_use: ::core::option::Option, + #[prost(string, optional, tag="4")] + pub memo_like: ::core::option::Option<::prost::alloc::string::String>, + } + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListBanksResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `ListBanksResponse`. +pub mod list_banks_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, repeated, tag="1")] + pub banks: ::prost::alloc::vec::Vec, + } +} +/// subject = bet.beteran.ss.bank.GetBank +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetBankRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `GetBankRequest`. +pub mod get_bank_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetBankResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `GetBankResponse`. +pub mod get_bank_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub bank: ::core::option::Option, + } +} +/// subject = bet.beteran.ss.bank.UpdateBank +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateBankRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `UpdateBankRequest`. +pub mod update_bank_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + #[prost(uint32, tag="3")] + pub sort_order: u32, + #[prost(bool, tag="4")] + pub show: bool, + #[prost(bool, tag="5")] + pub can_use: bool, + #[prost(string, optional, tag="6")] + pub memo: ::core::option::Option<::prost::alloc::string::String>, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateBankResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `UpdateBankResponse`. +pub mod update_bank_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub bank: ::core::option::Option, + } +} +/// subject = bet.beteran.ss.bank.DeleteBank +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteBankRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `DeleteBankRequest`. +pub mod delete_bank_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteBankResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `DeleteBankResponse`. +pub mod delete_bank_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + } +} diff --git a/src/ss/domain/mod.rs b/src/ss/domain/mod.rs deleted file mode 100644 index 4d481aa..0000000 --- a/src/ss/domain/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod site; diff --git a/src/ss/identity.rs b/src/ss/identity.rs new file mode 100644 index 0000000..ddf9791 --- /dev/null +++ b/src/ss/identity.rs @@ -0,0 +1,156 @@ +const SUBJECT: &str = "bet.beteran.ss.identity"; + +pub const SUBJECT_CHECK_USERNAME_FOR_DUPLICATION: &str = + const_format::concatcp!(SUBJECT, ".CheckUsernameForDuplication"); +pub const SUBJECT_CHECK_NICKNAME_FOR_DUPLICATION: &str = + const_format::concatcp!(SUBJECT, ".CheckNicknameForDuplication"); +pub const SUBJECT_CAPTCHA: &str = const_format::concatcp!(SUBJECT, ".Captcha"); +pub const SUBJECT_SIGNIN: &str = const_format::concatcp!(SUBJECT, ".Signin"); + + +/// subject = bet.beteran.ss.identity.CheckUsernameForDuplication; +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CheckUsernameForDuplicationRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `CheckUsernameForDuplicationRequest`. +pub mod check_username_for_duplication_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(string, tag="1")] + pub username: ::prost::alloc::string::String, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CheckUsernameForDuplicationResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `CheckUsernameForDuplicationResponse`. +pub mod check_username_for_duplication_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(bool, tag="1")] + pub duplicated: bool, + } +} +/// subject = bet.beteran.ss.identity.CheckNicknameForDuplication; +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CheckNicknameForDuplicationRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `CheckNicknameForDuplicationRequest`. +pub mod check_nickname_for_duplication_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(string, tag="1")] + pub nickname: ::prost::alloc::string::String, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CheckNicknameForDuplicationResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `CheckNicknameForDuplicationResponse`. +pub mod check_nickname_for_duplication_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(bool, tag="1")] + pub duplicated: bool, + } +} +/// subject = bet.beteran.ss.identity.Captcha +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CaptchaRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `CaptchaRequest`. +pub mod captcha_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CaptchaResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `CaptchaResponse`. +pub mod captcha_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(string, tag="1")] + pub security_code_hash: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub image: ::prost::alloc::string::String, + } +} +/// subject = bet.beteran.ss.identity.Signin +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SigninRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `SigninRequest`. +pub mod signin_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(string, tag="1")] + pub security_code_hash: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub security_code: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub username: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub password: ::prost::alloc::string::String, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SigninResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `SigninResponse`. +pub mod signin_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(string, tag="1")] + pub access_token: ::prost::alloc::string::String, + } +} +/// subject = bet.beteran.ss_event.identity.AfterSignin +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AfterSigninEvent { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub event: ::core::option::Option, +} +/// Nested message and enum types in `AfterSigninEvent`. +pub mod after_signin_event { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Event { + #[prost(message, optional, tag="1")] + pub member: ::core::option::Option, + } +} diff --git a/src/ss/member.rs b/src/ss/member.rs new file mode 100644 index 0000000..3d675a0 --- /dev/null +++ b/src/ss/member.rs @@ -0,0 +1,282 @@ +const SUBJECT: &str = "bet.beteran.ss.member"; + +pub const SUBJECT_CREATE_MEMBER: &str = const_format::concatcp!(SUBJECT, ".CreateMember"); +pub const SUBJECT_LIST_MEMBERS: &str = const_format::concatcp!(SUBJECT, ".ListMembers"); +pub const SUBJECT_GET_MEMBER: &str = const_format::concatcp!(SUBJECT, ".GetMember"); +pub const SUBJECT_GET_MEMBER_BY_USERNAME: &str = + const_format::concatcp!(SUBJECT, ".GetMemberByUsername"); +pub const SUBJECT_UPDATE_MEMBER: &str = const_format::concatcp!(SUBJECT, ".UpdateMember"); +pub const SUBJECT_DELETE_MEMBER: &str = const_format::concatcp!(SUBJECT, ".DeleteMember"); + + +/// subject = bet.beteran.ss.member.CreateMember +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateMemberRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `CreateMemberRequest`. +pub mod create_member_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(string, tag="1")] + pub site_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub member_class_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub member_level_id: ::prost::alloc::string::String, + #[prost(string, optional, tag="4")] + pub referrer_member_username: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, tag="5")] + pub username: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub password: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub nickname: ::prost::alloc::string::String, + #[prost(string, optional, tag="8")] + pub mobile_phone_number: ::core::option::Option<::prost::alloc::string::String>, + #[prost(enumeration="crate::models::member::MemberState", tag="9")] + pub state: i32, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateMemberResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `CreateMemberResponse`. +pub mod create_member_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub member: ::core::option::Option, + } +} +/// subject = bet.beteran.ss.member.ListMembers +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMembersRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `ListMembersRequest`. +pub mod list_members_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(message, optional, tag="1")] + pub pagination: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub sorts: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag="3")] + pub search: ::core::option::Option, + } + /// Nested message and enum types in `Request`. + pub mod request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Search { + #[prost(string, optional, tag="1")] + pub site_id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="2")] + pub member_class_id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="3")] + pub member_level_id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="4")] + pub referrer_member_id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="5")] + pub username_like: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="6")] + pub nickname_like: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="7")] + pub mobile_phone_number_like: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="8")] + pub last_signined_ip: ::core::option::Option<::prost::alloc::string::String>, + #[prost(enumeration="crate::models::member::MemberState", optional, tag="9")] + pub state: ::core::option::Option, + #[prost(uint64, optional, tag="10")] + pub deleted_at: ::core::option::Option, + } + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMembersResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `ListMembersResponse`. +pub mod list_members_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, repeated, tag="1")] + pub members: ::prost::alloc::vec::Vec, + } +} +/// subject = bet.beteran.ss.member.GetMember +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetMemberRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `GetMemberRequest`. +pub mod get_member_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetMemberResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `GetMemberResponse`. +pub mod get_member_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub member: ::core::option::Option, + } +} +/// subject = bet.beteran.ss.member.GetMemberByUsername +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetMemberByUsernameRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `GetMemberByUsernameRequest`. +pub mod get_member_by_username_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(string, tag="1")] + pub username: ::prost::alloc::string::String, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetMemberByUsernameResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `GetMemberByUsernameResponse`. +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, + } +} +/// subject = bet.beteran.ss.member.UpdateMember +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateMemberRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `UpdateMemberRequest`. +pub mod update_member_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, optional, tag="2")] + pub site_id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="3")] + pub member_level_id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="4")] + pub password: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="5")] + pub mobile_phone_number: ::core::option::Option<::prost::alloc::string::String>, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateMemberResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `UpdateMemberResponse`. +pub mod update_member_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub member: ::core::option::Option, + } +} +/// subject = bet.beteran.ss.member.UpdateMemberForState +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateMemberForStateRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `UpdateMemberForStateRequest`. +pub mod update_member_for_state_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(enumeration="crate::models::member::MemberState", tag="2")] + pub state: i32, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateMemberForStateResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `UpdateMemberForStateResponse`. +pub mod update_member_for_state_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub member: ::core::option::Option, + } +} +/// subject = bet.beteran.ss.member.DeleteMember +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteMemberRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `DeleteMemberRequest`. +pub mod delete_member_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteMemberResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `DeleteMemberResponse`. +pub mod delete_member_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + } +} diff --git a/src/ss/member/identity.rs b/src/ss/member/identity.rs deleted file mode 100644 index 53605fc..0000000 --- a/src/ss/member/identity.rs +++ /dev/null @@ -1,122 +0,0 @@ -use crate::models::core; -use crate::protobuf::rpc; -use crate::models::member; - -const SUBJECT: &str = "bet.beteran.ss.member.identity"; -const EVENT_SUBJECT: &str = "bet.beteran.ss.event.member.identity"; - - -pub const SUBJECT_CHECK_USERNAME_FOR_DUPLICATION: &str = - const_format::concatcp!(SUBJECT, ".CheckUsernameForDuplication"); -/// subject = bet.beteran.ss.member.identity.CheckUsernameForDuplication; -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CheckUsernameForDuplicationRequest { - #[prost(message, optional, tag = "1")] - pub client: ::core::option::Option, - #[prost(string, tag = "2")] - pub username: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CheckUsernameForDuplicationResponse { - #[prost(message, optional, tag = "1")] - pub error: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub result: ::core::option::Option, -} -/// Nested message and enum types in `CheckUsernameForDuplicationResponse`. -pub mod check_username_for_duplication_response { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Result { - #[prost(bool, tag = "1")] - pub duplicated: bool, - } -} -pub const SUBJECT_CHECK_NICKNAME_FOR_DUPLICATION: &str = - const_format::concatcp!(SUBJECT, ".CheckNicknameForDuplication"); -/// subject = bet.beteran.ss.member.identity.CheckNicknameForDuplication; -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CheckNicknameForDuplicationRequest { - #[prost(message, optional, tag = "1")] - pub client: ::core::option::Option, - #[prost(string, tag = "2")] - pub nickname: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CheckNicknameForDuplicationResponse { - #[prost(message, optional, tag = "1")] - pub error: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub result: ::core::option::Option, -} -/// Nested message and enum types in `CheckNicknameForDuplicationResponse`. -pub mod check_nickname_for_duplication_response { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Result { - #[prost(bool, tag = "1")] - pub duplicated: bool, - } -} -pub const SUBJECT_CAPTCHA: &str = const_format::concatcp!(SUBJECT, ".Captcha"); -/// subject = bet.beteran.ss.member.identity.Captcha -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CaptchaRequest { - #[prost(message, optional, tag = "1")] - pub client: ::core::option::Option, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CaptchaResponse { - #[prost(message, optional, tag = "1")] - pub error: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub result: ::core::option::Option, -} -/// Nested message and enum types in `CaptchaResponse`. -pub mod captcha_response { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Result { - #[prost(string, tag = "1")] - pub security_code_hash: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub image: ::prost::alloc::string::String, - } -} -pub const SUBJECT_SIGNIN: &str = const_format::concatcp!(SUBJECT, ".Signin"); -/// subject = bet.beteran.ss.member.identity.Signin -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SigninRequest { - #[prost(message, optional, tag = "1")] - pub client: ::core::option::Option, - #[prost(string, tag = "2")] - pub security_code_hash: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub security_code: ::prost::alloc::string::String, - #[prost(string, tag = "4")] - pub username: ::prost::alloc::string::String, - #[prost(string, tag = "5")] - pub password: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SigninResponse { - #[prost(message, optional, tag = "1")] - pub error: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub result: ::core::option::Option, -} -/// Nested message and enum types in `SigninResponse`. -pub mod signin_response { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Result { - #[prost(string, tag = "1")] - pub access_token: ::prost::alloc::string::String, - } -} - -pub const EVENT_SUBJECT_AFTER_SIGNIN: &str = const_format::concatcp!(EVENT_SUBJECT, ".AfterSignin"); -/// subject = bet.beteran.ss.event.member.identity.AfterSignin -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AfterSigninEvent { - #[prost(message, optional, tag="1")] - pub client: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub member: ::core::option::Option, -} diff --git a/src/ss/member/mod.rs b/src/ss/member/mod.rs deleted file mode 100644 index ea46069..0000000 --- a/src/ss/member/mod.rs +++ /dev/null @@ -1,4 +0,0 @@ -pub mod identity; -pub mod member; -pub mod member_class; -pub mod member_level; diff --git a/src/ss/member_bank_account.rs b/src/ss/member_bank_account.rs new file mode 100644 index 0000000..096addb --- /dev/null +++ b/src/ss/member_bank_account.rs @@ -0,0 +1,197 @@ +const SUBJECT: &str = "bet.beteran.ss.member_bank_account"; + +pub const SUBJECT_CREATE_MEMBER_BANK_ACCOUNT: &str = const_format::concatcp!(SUBJECT, ".CreateMemberBankAccount"); +pub const SUBJECT_LIST_MEMBER_BANK_ACCOUNTS: &str = const_format::concatcp!(SUBJECT, ".ListMemberBankAccounts"); +pub const SUBJECT_GET_MEMBER_BANK_ACCOUNT: &str = const_format::concatcp!(SUBJECT, ".GetMemberBankAccount"); +pub const SUBJECT_UPDATE_MEMBER_BANK_ACCOUNT: &str = const_format::concatcp!(SUBJECT, ".UpdateMemberBankAccount"); +pub const SUBJECT_DELETE_MEMBER_BANK_ACCOUNT: &str = const_format::concatcp!(SUBJECT, ".DeleteMemberBankAccount"); + +/// subject = bet.beteran.ss.member_bank_account.CreateMemberBankAccount +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateMemberBankAccountRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `CreateMemberBankAccountRequest`. +pub mod create_member_bank_account_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(string, tag="1")] + pub member_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub bank_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub account_number: ::prost::alloc::string::String, + #[prost(string, optional, tag="5")] + pub memo: ::core::option::Option<::prost::alloc::string::String>, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateMemberBankAccountResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `CreateMemberBankAccountResponse`. +pub mod create_member_bank_account_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub member_bank_account: ::core::option::Option, + } +} +/// subject = bet.beteran.ss.member_bank_account.ListMemberBankAccounts +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMemberBankAccountsRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `ListMemberBankAccountsRequest`. +pub mod list_member_bank_accounts_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(message, optional, tag="1")] + pub pagination: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub sorts: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag="3")] + pub search: ::core::option::Option, + } + /// Nested message and enum types in `Request`. + pub mod request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Search { + #[prost(string, optional, tag="1")] + pub member_id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="2")] + pub bank_id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="3")] + pub name_like: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="4")] + pub account_number_like: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="5")] + pub memo_like: ::core::option::Option<::prost::alloc::string::String>, + } + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMemberBankAccountsResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `ListMemberBankAccountsResponse`. +pub mod list_member_bank_accounts_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, repeated, tag="1")] + pub member_bank_accounts: ::prost::alloc::vec::Vec, + } +} +/// subject = bet.beteran.ss.member_bank_account.GetMemberBankAccount +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetMemberBankAccountRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `GetMemberBankAccountRequest`. +pub mod get_member_bank_account_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetMemberBankAccountResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `GetMemberBankAccountResponse`. +pub mod get_member_bank_account_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub member_bank_account: ::core::option::Option, + } +} +/// subject = bet.beteran.ss.member_bank_account.UpdateMemberBankAccount +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateMemberBankAccountRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `UpdateMemberBankAccountRequest`. +pub mod update_member_bank_account_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub bank_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub account_number: ::prost::alloc::string::String, + #[prost(string, optional, tag="5")] + pub memo: ::core::option::Option<::prost::alloc::string::String>, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateMemberBankAccountResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `UpdateMemberBankAccountResponse`. +pub mod update_member_bank_account_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub member_bank_account: ::core::option::Option, + } +} +/// subject = bet.beteran.ss.member_bank_account.DeleteMemberBankAccount +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteMemberBankAccountRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `DeleteMemberBankAccountRequest`. +pub mod delete_member_bank_account_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteMemberBankAccountResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `DeleteMemberBankAccountResponse`. +pub mod delete_member_bank_account_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + } +} diff --git a/src/ss/member_bank_deposit.rs b/src/ss/member_bank_deposit.rs new file mode 100644 index 0000000..e3d200e --- /dev/null +++ b/src/ss/member_bank_deposit.rs @@ -0,0 +1,226 @@ +const SUBJECT: &str = "bet.beteran.ss.member_bank_deposit"; + +pub const SUBJECT_CREATE_MEMBER_BANK_DEPOSIT: &str = const_format::concatcp!(SUBJECT, ".CreateMemberBankDeposit"); +pub const SUBJECT_LIST_MEMBER_BANK_DEPOSITS: &str = const_format::concatcp!(SUBJECT, ".ListMemberBankDeposits"); +pub const SUBJECT_GET_MEMBER_BANK_DEPOSIT: &str = const_format::concatcp!(SUBJECT, ".GetMemberBankDeposit"); +pub const SUBJECT_UPDATE_MEMBER_BANK_DEPOSIT: &str = const_format::concatcp!(SUBJECT, ".UpdateMemberBankDeposit"); +pub const SUBJECT_UPDATE_MEMBER_BANK_DEPOSIT_FOR_STATE: &str = const_format::concatcp!(SUBJECT, ".UpdateMemberBankDepositForState"); +pub const SUBJECT_DELETE_MEMBER_BANK_DEPOSIT: &str = const_format::concatcp!(SUBJECT, ".DeleteMemberBankDeposit"); + + +/// subject = bet.beteran.ss.member_bank_deposit.CreateMemberBankDeposit +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateMemberBankDepositRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `CreateMemberBankDepositRequest`. +pub mod create_member_bank_deposit_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(uint32, tag="2")] + pub amount: u32, + #[prost(string, optional, tag="3")] + pub memo: ::core::option::Option<::prost::alloc::string::String>, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateMemberBankDepositResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `CreateMemberBankDepositResponse`. +pub mod create_member_bank_deposit_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub member_bank_deposit: ::core::option::Option, + } +} +/// subject = bet.beteran.ss.member_bank_deposit.ListMemberBankDeposits +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMemberBankDepositsRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `ListMemberBankDepositsRequest`. +pub mod list_member_bank_deposits_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(message, optional, tag="1")] + pub pagination: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub sorts: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag="3")] + pub search: ::core::option::Option, + } + /// Nested message and enum types in `Request`. + pub mod request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Search { + #[prost(string, optional, tag="1")] + pub member_id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="2")] + pub name_like: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="3")] + pub amount: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="4")] + pub memo_like: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="5")] + pub state: ::core::option::Option<::prost::alloc::string::String>, + } + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMemberBankDepositsResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `ListMemberBankDepositsResponse`. +pub mod list_member_bank_deposits_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, repeated, tag="1")] + pub member_bank_deposits: ::prost::alloc::vec::Vec, + } +} +/// subject = bet.beteran.ss.member_bank_deposit.GetMemberBankDeposit +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetMemberBankDepositRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `GetMemberBankDepositRequest`. +pub mod get_member_bank_deposit_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetMemberBankDepositResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `GetMemberBankDepositResponse`. +pub mod get_member_bank_deposit_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub member_bank_deposit: ::core::option::Option, + } +} +/// subject = bet.beteran.ss.member_bank_deposit.UpdateMemberBankDeposit +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateMemberBankDepositRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `UpdateMemberBankDepositRequest`. +pub mod update_member_bank_deposit_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub name: ::prost::alloc::string::String, + #[prost(uint32, tag="5")] + pub amount: u32, + #[prost(string, optional, tag="7")] + pub memo: ::core::option::Option<::prost::alloc::string::String>, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateMemberBankDepositResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `UpdateMemberBankDepositResponse`. +pub mod update_member_bank_deposit_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub member_bank_deposit: ::core::option::Option, + } +} +/// subject = bet.beteran.ss.member_bank_deposit.UpdateMemberBankDepositForState +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateMemberBankDepositForStateRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `UpdateMemberBankDepositForStateRequest`. +pub mod update_member_bank_deposit_for_state_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(enumeration="crate::models::member_bank_deposit::MemberBankDepositState", tag="2")] + pub state: i32, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateMemberBankDepositForStateResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `UpdateMemberBankDepositForStateResponse`. +pub mod update_member_bank_deposit_for_state_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub member_bank_deposit: ::core::option::Option, + } +} +/// subject = bet.beteran.ss.member_bank_deposit.DeleteMemberBankDeposit +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteMemberBankDepositRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `DeleteMemberBankDepositRequest`. +pub mod delete_member_bank_deposit_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteMemberBankDepositResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `DeleteMemberBankDepositResponse`. +pub mod delete_member_bank_deposit_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + } +} diff --git a/src/ss/member_bank_withdraw.rs b/src/ss/member_bank_withdraw.rs new file mode 100644 index 0000000..371e832 --- /dev/null +++ b/src/ss/member_bank_withdraw.rs @@ -0,0 +1,242 @@ +const SUBJECT: &str = "bet.beteran.ss.member_bank_withdraw"; + +pub const SUBJECT_CREATE_MEMBER_BANK_WITHDRAW: &str = const_format::concatcp!(SUBJECT, ".CreateMemberBankWithdraw"); +pub const SUBJECT_LIST_MEMBER_BANK_WITHDRAWS: &str = const_format::concatcp!(SUBJECT, ".ListMemberBankWithdraws"); +pub const SUBJECT_GET_MEMBER_BANK_WITHDRAW: &str = const_format::concatcp!(SUBJECT, ".GetMemberBankWithdraw"); +pub const SUBJECT_UPDATE_MEMBER_BANK_WITHDRAW: &str = const_format::concatcp!(SUBJECT, ".UpdateMemberBankWithdraw"); +pub const SUBJECT_UPDATE_MEMBER_BANK_WITHDRAW_FOR_STATE: &str = const_format::concatcp!(SUBJECT, ".UpdateMemberBankWithdrawForState"); +pub const SUBJECT_DELETE_MEMBER_BANK_WITHDRAW: &str = const_format::concatcp!(SUBJECT, ".DeleteMemberBankWithdraw"); + + +/// subject = bet.beteran.ss.member_bank_withdraw.CreateMemberBankWithdraw +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateMemberBankWithdrawRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `CreateMemberBankWithdrawRequest`. +pub mod create_member_bank_withdraw_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(string, tag="1")] + pub bank_name: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub account_number: ::prost::alloc::string::String, + #[prost(uint32, tag="4")] + pub amount: u32, + #[prost(string, tag="5")] + pub password: ::prost::alloc::string::String, + #[prost(string, optional, tag="6")] + pub memo: ::core::option::Option<::prost::alloc::string::String>, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateMemberBankWithdrawResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `CreateMemberBankWithdrawResponse`. +pub mod create_member_bank_withdraw_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub member_bank_withdraw: ::core::option::Option, + } +} +/// subject = bet.beteran.ss.member_bank_withdraw.ListMemberBankWithdraws +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMemberBankWithdrawsRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `ListMemberBankWithdrawsRequest`. +pub mod list_member_bank_withdraws_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(message, optional, tag="1")] + pub pagination: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub sorts: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag="3")] + pub search: ::core::option::Option, + } + /// Nested message and enum types in `Request`. + pub mod request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Search { + #[prost(string, optional, tag="1")] + pub member_id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="2")] + pub bank_name_like: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="3")] + pub name_like: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="4")] + pub account_number_like: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="5")] + pub amount: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="6")] + pub memo_like: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="7")] + pub state: ::core::option::Option<::prost::alloc::string::String>, + } + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMemberBankWithdrawsResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `ListMemberBankWithdrawsResponse`. +pub mod list_member_bank_withdraws_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, repeated, tag="1")] + pub member_bank_withdraws: ::prost::alloc::vec::Vec, + } +} +/// subject = bet.beteran.ss.member_bank_withdraw.GetMemberBankWithdraw +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetMemberBankWithdrawRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `GetMemberBankWithdrawRequest`. +pub mod get_member_bank_withdraw_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetMemberBankWithdrawResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `GetMemberBankWithdrawResponse`. +pub mod get_member_bank_withdraw_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub member_bank_withdraw: ::core::option::Option, + } +} +/// subject = bet.beteran.ss.member_bank_withdraw.UpdateMemberBankWithdraw +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateMemberBankWithdrawRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `UpdateMemberBankWithdrawRequest`. +pub mod update_member_bank_withdraw_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub bank_name: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub account_number: ::prost::alloc::string::String, + #[prost(uint32, tag="5")] + pub amount: u32, + #[prost(string, tag="6")] + pub password: ::prost::alloc::string::String, + #[prost(string, optional, tag="7")] + pub memo: ::core::option::Option<::prost::alloc::string::String>, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateMemberBankWithdrawResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `UpdateMemberBankWithdrawResponse`. +pub mod update_member_bank_withdraw_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub member_bank_withdraw: ::core::option::Option, + } +} +/// subject = bet.beteran.ss.member_bank_withdraw.UpdateMemberBankWithdrawForState +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateMemberBankWithdrawForStateRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `UpdateMemberBankWithdrawForStateRequest`. +pub mod update_member_bank_withdraw_for_state_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(enumeration="crate::models::member_bank_withdraw::MemberBankWithdrawState", tag="2")] + pub state: i32, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateMemberBankWithdrawForStateResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `UpdateMemberBankWithdrawForStateResponse`. +pub mod update_member_bank_withdraw_for_state_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub member_bank_withdraw: ::core::option::Option, + } +} +/// subject = bet.beteran.ss.member_bank_withdraw.DeleteMemberBankWithdraw +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteMemberBankWithdrawRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `DeleteMemberBankWithdrawRequest`. +pub mod delete_member_bank_withdraw_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteMemberBankWithdrawResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `DeleteMemberBankWithdrawResponse`. +pub mod delete_member_bank_withdraw_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + } +} diff --git a/src/ss/member_class.rs b/src/ss/member_class.rs new file mode 100644 index 0000000..be76c87 --- /dev/null +++ b/src/ss/member_class.rs @@ -0,0 +1,180 @@ +const SUBJECT: &str = "bet.beteran.ss.member_class"; + +pub const SUBJECT_CREATE_MEMBER_CLASS: &str = const_format::concatcp!(SUBJECT, ".CreateMemberClass"); +pub const SUBJECT_LIST_MEMBER_CLASSSES: &str = const_format::concatcp!(SUBJECT, ".ListMemberClasses"); +pub const SUBJECT_GET_MEMBER_CLASS: &str = const_format::concatcp!(SUBJECT, ".GetMemberClass"); +pub const SUBJECT_UPDATE_MEMBER_CLASS: &str = const_format::concatcp!(SUBJECT, ".UpdateMemberClass"); +pub const SUBJECT_DELETE_MEMBER_CLASS: &str = const_format::concatcp!(SUBJECT, ".DeleteMemberClass"); + + +/// subject = bet.beteran.ss.member_class.CreateMemberClass +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateMemberClassRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `CreateMemberClassRequest`. +pub mod create_member_class_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(string, optional, tag="1")] + pub parent_id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateMemberClassResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `CreateMemberClassResponse`. +pub mod create_member_class_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub member_class: ::core::option::Option, + } +} +/// subject = bet.beteran.ss.member_class.ListMemberClasses +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMemberClassesRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `ListMemberClassesRequest`. +pub mod list_member_classes_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(message, optional, tag="1")] + pub pagination: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub sorts: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag="3")] + pub search: ::core::option::Option, + } + /// Nested message and enum types in `Request`. + pub mod request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Search { + #[prost(string, optional, tag="1")] + pub name_like: ::core::option::Option<::prost::alloc::string::String>, + } + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMemberClassesResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `ListMemberClassesResponse`. +pub mod list_member_classes_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, repeated, tag="1")] + pub member_classes: ::prost::alloc::vec::Vec, + } +} +/// subject = bet.beteran.ss.member_class.GetMemberClass +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetMemberClassRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `GetMemberClassRequest`. +pub mod get_member_class_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetMemberClassResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `GetMemberClassResponse`. +pub mod get_member_class_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub member_class: ::core::option::Option, + } +} +/// subject = bet.beteran.ss.member_class.UpdateMemberClass +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateMemberClassRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `UpdateMemberClassRequest`. +pub mod update_member_class_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[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, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateMemberClassResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `UpdateMemberClassResponse`. +pub mod update_member_class_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub member_class: ::core::option::Option, + } +} +/// subject = bet.beteran.ss.member_class.DeleteMemberClass +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteMemberClassRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `DeleteMemberClassRequest`. +pub mod delete_member_class_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteMemberClassResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `DeleteMemberClassResponse`. +pub mod delete_member_class_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + } +} diff --git a/src/ss/member_level.rs b/src/ss/member_level.rs new file mode 100644 index 0000000..b011b50 --- /dev/null +++ b/src/ss/member_level.rs @@ -0,0 +1,180 @@ +const SUBJECT: &str = "bet.beteran.ss.member_level"; + +pub const SUBJECT_CREATE_MEMBER_LEVEL: &str = const_format::concatcp!(SUBJECT, ".CreateMemberLevel"); +pub const SUBJECT_LIST_MEMBER_LEVELSS: &str = const_format::concatcp!(SUBJECT, ".ListMemberLevels"); +pub const SUBJECT_GET_MEMBER_LEVEL: &str = const_format::concatcp!(SUBJECT, ".GetMemberLevel"); +pub const SUBJECT_UPDATE_MEMBER_LEVEL: &str = const_format::concatcp!(SUBJECT, ".UpdateMemberLevel"); +pub const SUBJECT_DELETE_MEMBER_LEVEL: &str = const_format::concatcp!(SUBJECT, ".DeleteMemberLevel"); + + +/// subject = bet.beteran.ss.member_level.CreateMemberLevel +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateMemberLevelRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `CreateMemberLevelRequest`. +pub mod create_member_level_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(uint32, tag="2")] + pub sort_order: u32, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateMemberLevelResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `CreateMemberLevelResponse`. +pub mod create_member_level_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub member_level: ::core::option::Option, + } +} +/// subject = bet.beteran.ss.member_level.ListMemberLevels +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMemberLevelsRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `ListMemberLevelsRequest`. +pub mod list_member_levels_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(message, optional, tag="1")] + pub pagination: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub sorts: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag="3")] + pub search: ::core::option::Option, + } + /// Nested message and enum types in `Request`. + pub mod request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Search { + #[prost(string, optional, tag="1")] + pub name_like: ::core::option::Option<::prost::alloc::string::String>, + } + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMemberLevelsResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `ListMemberLevelsResponse`. +pub mod list_member_levels_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, repeated, tag="1")] + pub member_levels: ::prost::alloc::vec::Vec, + } +} +/// subject = bet.beteran.ss.member_level.GetMemberLevel +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetMemberLevelRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `GetMemberLevelRequest`. +pub mod get_member_level_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetMemberLevelResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `GetMemberLevelResponse`. +pub mod get_member_level_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub member_level: ::core::option::Option, + } +} +/// subject = bet.beteran.ss.member_level.UpdateMemberLevel +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateMemberLevelRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `UpdateMemberLevelRequest`. +pub mod update_member_level_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + #[prost(uint32, tag="3")] + pub sort_order: u32, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateMemberLevelResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `UpdateMemberLevelResponse`. +pub mod update_member_level_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub member_level: ::core::option::Option, + } +} +/// subject = bet.beteran.ss.member_level.DeleteMemberLevel +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteMemberLevelRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `DeleteMemberLevelRequest`. +pub mod delete_member_level_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteMemberLevelResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `DeleteMemberLevelResponse`. +pub mod delete_member_level_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + } +} diff --git a/src/ss/mod.rs b/src/ss/mod.rs index 018c63c..6aff3c8 100644 --- a/src/ss/mod.rs +++ b/src/ss/mod.rs @@ -1,8 +1,9 @@ -//! -//! - -/// -/// +pub mod bank; +pub mod identity; +pub mod member_bank_account; +pub mod member_bank_deposit; +pub mod member_bank_withdraw; +pub mod member_class; +pub mod member_level; pub mod member; -pub mod domain; -pub mod account; \ No newline at end of file +pub mod site; diff --git a/src/ss/site.rs b/src/ss/site.rs new file mode 100644 index 0000000..5346317 --- /dev/null +++ b/src/ss/site.rs @@ -0,0 +1,210 @@ +const SUBJECT: &str = "bet.beteran.ss.site"; + +pub const SUBJECT_CREATE_SITE: &str = const_format::concatcp!(SUBJECT, ".CreateSite"); +pub const SUBJECT_LIST_SITES: &str = const_format::concatcp!(SUBJECT, ".ListSites"); +pub const SUBJECT_GET_SITE: &str = const_format::concatcp!(SUBJECT, ".GetSite"); +pub const SUBJECT_UPDATE_SITE: &str = const_format::concatcp!(SUBJECT, ".UpdateSite"); +pub const SUBJECT_DELETE_SITE: &str = const_format::concatcp!(SUBJECT, ".DeleteSite"); + + +/// subject = bet.beteran.ss.site.CreateSite; +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateSiteRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `CreateSiteRequest`. +pub mod create_site_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(string, tag="1")] + pub url: ::prost::alloc::string::String, + #[prost(string, optional, tag="2")] + pub name: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="3")] + pub path: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bool, tag="4")] + pub show: bool, + #[prost(bool, tag="5")] + pub can_use: bool, + #[prost(string, optional, tag="6")] + pub memo: ::core::option::Option<::prost::alloc::string::String>, + #[prost(uint64, optional, tag="7")] + pub expires_at: ::core::option::Option, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateSiteResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `CreateSiteResponse`. +pub mod create_site_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub site: ::core::option::Option, + } +} +/// subject = bet.beteran.ss.site.ListSites; +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListSitesRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `ListSitesRequest`. +pub mod list_sites_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(message, optional, tag="1")] + pub pagination: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub sorts: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag="3")] + pub search: ::core::option::Option, + } + /// Nested message and enum types in `Request`. + pub mod request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Search { + #[prost(string, optional, tag="1")] + pub url_like: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="2")] + pub name_like: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="3")] + pub path_like: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bool, optional, tag="4")] + pub show: ::core::option::Option, + #[prost(bool, optional, tag="5")] + pub can_use: ::core::option::Option, + #[prost(string, optional, tag="6")] + pub memo_like: ::core::option::Option<::prost::alloc::string::String>, + } + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListSitesResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `ListSitesResponse`. +pub mod list_sites_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, repeated, tag="1")] + pub sites: ::prost::alloc::vec::Vec, + } +} +/// subject = bet.beteran.ss.site.GetSite +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetSiteRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `GetSiteRequest`. +pub mod get_site_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetSiteResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `GetSiteResponse`. +pub mod get_site_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub site: ::core::option::Option, + } +} +/// subject = bet.beteran.ss.site.UpdateSite +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateSiteRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `UpdateSiteRequest`. +pub mod update_site_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub url: ::prost::alloc::string::String, + #[prost(string, optional, tag="3")] + pub name: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="4")] + pub path: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bool, tag="5")] + pub show: bool, + #[prost(bool, tag="6")] + pub can_use: bool, + #[prost(string, optional, tag="7")] + pub memo: ::core::option::Option<::prost::alloc::string::String>, + #[prost(uint64, optional, tag="8")] + pub expires_at: ::core::option::Option, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateSiteResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `UpdateSiteResponse`. +pub mod update_site_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + #[prost(message, optional, tag="1")] + pub site: ::core::option::Option, + } +} +/// subject = bet.beteran.ss.site.DeleteSite +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteSiteRequest { + #[prost(message, optional, tag="1")] + pub client: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `DeleteSiteRequest`. +pub mod delete_site_request { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Request { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteSiteResponse { + #[prost(message, optional, tag="1")] + pub error: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub result: ::core::option::Option, +} +/// Nested message and enum types in `DeleteSiteResponse`. +pub mod delete_site_response { + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Result { + } +}