bank is added
This commit is contained in:
parent
f6beee52cb
commit
56c0211617
13
src/c2se/backend/account.rs
Normal file
13
src/c2se/backend/account.rs
Normal file
|
@ -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
|
|
@ -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<rpc::Error>,
|
||||
#[prost(message, optional, tag="2")]
|
||||
pub result: ::core::option::Option<create_member_response::Result>,
|
||||
}
|
||||
/// 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<member::MemberModel>,
|
||||
}
|
||||
}
|
||||
|
||||
pub const SUBJECT_LIST_MEMBERS: &str = const_format::concatcp!(SUBJECT, ".ListMembers");
|
||||
/// subject = bet.beteran.c2se.backend.member.ListMembers
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
pub mod identity;
|
||||
pub mod member;
|
||||
pub mod site;
|
||||
pub mod account;
|
||||
|
|
125
src/c2se/common/bank.rs
Normal file
125
src/c2se/common/bank.rs
Normal file
|
@ -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<u64>,
|
||||
}
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct CreateBankResponse {
|
||||
#[prost(message, optional, tag="1")]
|
||||
pub error: ::core::option::Option<rpc::Error>,
|
||||
#[prost(message, optional, tag="2")]
|
||||
pub result: ::core::option::Option<create_bank_response::Result>,
|
||||
}
|
||||
/// 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<account::Bank>,
|
||||
}
|
||||
}
|
||||
|
||||
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<pagination::Pagination>,
|
||||
#[prost(message, repeated, tag="2")]
|
||||
pub searches: ::prost::alloc::vec::Vec<pagination::Search>,
|
||||
#[prost(message, repeated, tag="3")]
|
||||
pub sorts: ::prost::alloc::vec::Vec<pagination::Sort>,
|
||||
#[prost(string, optional, tag="4")]
|
||||
pub name_like: ::core::option::Option<::prost::alloc::string::String>,
|
||||
#[prost(bool, optional, tag="5")]
|
||||
pub show: ::core::option::Option<bool>,
|
||||
#[prost(bool, optional, tag="6")]
|
||||
pub can_use: ::core::option::Option<bool>,
|
||||
#[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<rpc::Error>,
|
||||
#[prost(message, optional, tag="2")]
|
||||
pub result: ::core::option::Option<list_banks_response::Result>,
|
||||
}
|
||||
/// 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<account::Bank>,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
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<rpc::Error>,
|
||||
#[prost(message, optional, tag="2")]
|
||||
pub result: ::core::option::Option<update_bank_response::Result>,
|
||||
}
|
||||
/// 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<account::Bank>,
|
||||
}
|
||||
}
|
||||
|
||||
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<rpc::Error>,
|
||||
#[prost(message, optional, tag="2")]
|
||||
pub result: ::core::option::Option<delete_bank_response::Result>,
|
||||
}
|
||||
/// Nested message and enum types in `DeleteBankResponse`.
|
||||
pub mod delete_bank_response {
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct Result {
|
||||
}
|
||||
}
|
|
@ -1 +1,2 @@
|
|||
pub mod identity;
|
||||
pub mod bank;
|
||||
|
|
7
src/c2se/frontend/account.rs
Normal file
7
src/c2se/frontend/account.rs
Normal file
|
@ -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
|
17
src/models/account.rs
Normal file
17
src/models/account.rs
Normal file
|
@ -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,
|
||||
}
|
130
src/ss/account/bank.rs
Normal file
130
src/ss/account/bank.rs
Normal file
|
@ -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<core::network::Client>,
|
||||
#[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<rpc::Error>,
|
||||
#[prost(message, optional, tag="2")]
|
||||
pub result: ::core::option::Option<create_bank_response::Result>,
|
||||
}
|
||||
/// 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<super::super::super::super::account::Bank>,
|
||||
}
|
||||
}
|
||||
|
||||
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<core::network::Client>,
|
||||
#[prost(message, optional, tag="2")]
|
||||
pub pagination: ::core::option::Option<pagination::Pagination>,
|
||||
#[prost(message, repeated, tag="3")]
|
||||
pub searches: ::prost::alloc::vec::Vec<pagination::Search>,
|
||||
#[prost(message, repeated, tag="4")]
|
||||
pub sorts: ::prost::alloc::vec::Vec<pagination::Sort>,
|
||||
#[prost(string, optional, tag="5")]
|
||||
pub name_like: ::core::option::Option<::prost::alloc::string::String>,
|
||||
#[prost(bool, optional, tag="6")]
|
||||
pub show: ::core::option::Option<bool>,
|
||||
#[prost(bool, optional, tag="7")]
|
||||
pub can_use: ::core::option::Option<bool>,
|
||||
#[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<rpc::Error>,
|
||||
#[prost(message, optional, tag="2")]
|
||||
pub result: ::core::option::Option<list_banks_response::Result>,
|
||||
}
|
||||
/// 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<super::super::super::super::account::Bank>,
|
||||
}
|
||||
}
|
||||
|
||||
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<core::network::Client>,
|
||||
#[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<rpc::Error>,
|
||||
#[prost(message, optional, tag="2")]
|
||||
pub result: ::core::option::Option<update_bank_response::Result>,
|
||||
}
|
||||
/// 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<super::super::super::super::account::Bank>,
|
||||
}
|
||||
}
|
||||
|
||||
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<core::network::Client>,
|
||||
#[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<rpc::Error>,
|
||||
#[prost(message, optional, tag="2")]
|
||||
pub result: ::core::option::Option<delete_bank_response::Result>,
|
||||
}
|
||||
/// Nested message and enum types in `DeleteBankResponse`.
|
||||
pub mod delete_bank_response {
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct Result {
|
||||
}
|
||||
}
|
1
src/ss/account/mod.rs
Normal file
1
src/ss/account/mod.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub mod bank;
|
|
@ -5,3 +5,4 @@
|
|||
///
|
||||
pub mod member;
|
||||
pub mod domain;
|
||||
pub mod account;
|
Loading…
Reference in New Issue
Block a user