From 56c0211617913caa05b39dd3a33a5e68889b6853 Mon Sep 17 00:00:00 2001 From: PARK BYUNG JUN Date: Fri, 12 Aug 2022 06:13:39 +0000 Subject: [PATCH] bank is added --- src/c2se/backend/account.rs | 13 ++++ src/c2se/backend/member.rs | 39 +++++++++++ src/c2se/backend/mod.rs | 1 + src/c2se/common/bank.rs | 125 +++++++++++++++++++++++++++++++++ src/c2se/common/mod.rs | 1 + src/c2se/frontend/account.rs | 7 ++ src/models/account.rs | 17 +++++ src/ss/account/bank.rs | 130 +++++++++++++++++++++++++++++++++++ src/ss/account/mod.rs | 1 + src/ss/mod.rs | 1 + 10 files changed, 335 insertions(+) create mode 100644 src/c2se/backend/account.rs create mode 100644 src/c2se/common/bank.rs create mode 100644 src/c2se/frontend/account.rs create mode 100644 src/models/account.rs create mode 100644 src/ss/account/bank.rs create mode 100644 src/ss/account/mod.rs diff --git a/src/c2se/backend/account.rs b/src/c2se/backend/account.rs new file mode 100644 index 0000000..ba16396 --- /dev/null +++ b/src/c2se/backend/account.rs @@ -0,0 +1,13 @@ +use crate::protobuf::pagination; +use crate::protobuf::rpc; + +const SUBJECT: &str = "bet.beteran.c2se.backend.account"; + +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_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/member.rs b/src/c2se/backend/member.rs index 2900d6e..9bb30d1 100644 --- a/src/c2se/backend/member.rs +++ b/src/c2se/backend/member.rs @@ -4,6 +4,45 @@ use crate::models::member; const SUBJECT: &str = "bet.beteran.c2se.backend.member"; + +/// 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_id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, tag="5")] + pub username: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub nickname: ::prost::alloc::string::String, + #[prost(string, optional, tag="7")] + pub mobile_phone_number: ::core::option::Option<::prost::alloc::string::String>, + #[prost(enumeration="member::MemberState", tag="8")] + 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)] diff --git a/src/c2se/backend/mod.rs b/src/c2se/backend/mod.rs index d1df18e..a8ce7cd 100644 --- a/src/c2se/backend/mod.rs +++ b/src/c2se/backend/mod.rs @@ -1,3 +1,4 @@ pub mod identity; pub mod member; pub mod site; +pub mod account; diff --git a/src/c2se/common/bank.rs b/src/c2se/common/bank.rs new file mode 100644 index 0000000..5f0ca88 --- /dev/null +++ b/src/c2se/common/bank.rs @@ -0,0 +1,125 @@ +use crate::protobuf::rpc; +use crate::protobuf::pagination; +use crate::models::account; + +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 { + #[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 { + #[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 { + #[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/mod.rs b/src/c2se/common/mod.rs index db53a0c..91231e3 100644 --- a/src/c2se/common/mod.rs +++ b/src/c2se/common/mod.rs @@ -1 +1,2 @@ pub mod identity; +pub mod bank; diff --git a/src/c2se/frontend/account.rs b/src/c2se/frontend/account.rs new file mode 100644 index 0000000..5e936d1 --- /dev/null +++ b/src/c2se/frontend/account.rs @@ -0,0 +1,7 @@ +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/models/account.rs b/src/models/account.rs new file mode 100644 index 0000000..81715ff --- /dev/null +++ b/src/models/account.rs @@ -0,0 +1,17 @@ +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Bank { + #[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>, + #[prost(uint64, tag="6")] + pub created_at: u64, + #[prost(uint64, tag="7")] + pub updated_at: u64, +} diff --git a/src/ss/account/bank.rs b/src/ss/account/bank.rs new file mode 100644 index 0000000..d1877ae --- /dev/null +++ b/src/ss/account/bank.rs @@ -0,0 +1,130 @@ +use crate::protobuf::rpc; +use crate::protobuf::pagination; +use crate::models::account; +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")] + 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 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, + } +} + +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>, +} +#[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, + } +} + +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")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub name: ::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>, +} +#[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, + } +} + +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")] + 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/account/mod.rs b/src/ss/account/mod.rs new file mode 100644 index 0000000..4cc5aa0 --- /dev/null +++ b/src/ss/account/mod.rs @@ -0,0 +1 @@ +pub mod bank; \ No newline at end of file diff --git a/src/ss/mod.rs b/src/ss/mod.rs index 78fa834..018c63c 100644 --- a/src/ss/mod.rs +++ b/src/ss/mod.rs @@ -5,3 +5,4 @@ /// pub mod member; pub mod domain; +pub mod account; \ No newline at end of file