member_balance is added

This commit is contained in:
병준 박 2022-09-16 14:17:23 +00:00
parent 8aa5fade35
commit b0212ea432
11 changed files with 370 additions and 5 deletions

View File

@ -0,0 +1,11 @@
const SUBJECT: &str = "bet.beteran.c2se.backend.member_balance";
pub const SUBJECT_CREATE_MEMBER_BALANCE: &str =
const_format::concatcp!(SUBJECT, ".CreateMemberBalance");
pub const SUBJECT_LIST_MEMBER_BALANCES: &str =
const_format::concatcp!(SUBJECT, ".ListMemberBalances");
pub const SUBJECT_GET_MEMBER_BALANCE: &str = const_format::concatcp!(SUBJECT, ".GetMemberBalance");
pub const SUBJECT_UPDATE_MEMBER_BALANCE: &str =
const_format::concatcp!(SUBJECT, ".UpdateMemberBalance");
pub const SUBJECT_DELETE_MEMBER_BALANCE: &str =
const_format::concatcp!(SUBJECT, ".DeleteMemberBalance");

View File

@ -2,6 +2,7 @@ pub mod api;
pub mod bank;
pub mod identity;
pub mod member;
pub mod member_balance;
pub mod member_bank_account;
pub mod member_bank_deposit;
pub mod member_bank_withdraw;

View File

@ -0,0 +1,7 @@
const SUBJECT: &str = "bet.beteran.c2se.frontend.member_balance";
pub const SUBJECT_CREATE_MEMBER_BALANCE: &str =
const_format::concatcp!(SUBJECT, ".CreateMemberBalance");
pub const SUBJECT_GET_MEMBER_BALANCE: &str = const_format::concatcp!(SUBJECT, ".GetMemberBalance");
pub const SUBJECT_UPDATE_MEMBER_BALANCE: &str =
const_format::concatcp!(SUBJECT, ".UpdateMemberBalance");

View File

@ -2,6 +2,7 @@ pub mod api;
pub mod bank;
pub mod identity;
pub mod member;
pub mod member_balance;
pub mod member_bank_account;
pub mod member_bank_deposit;
pub mod member_bank_withdraw;

117
src/c2se/member_balance.rs Normal file
View File

@ -0,0 +1,117 @@
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateMemberBalanceRequest {
#[prost(string, tag = "1")]
pub member_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateMemberBalanceResponse {
#[prost(message, optional, tag = "1")]
pub error: ::core::option::Option<crate::protobuf::rpc::Error>,
#[prost(message, optional, tag = "2")]
pub result: ::core::option::Option<create_member_balance_response::Result>,
}
/// Nested message and enum types in `CreateMemberBalanceResponse`.
pub mod create_member_balance_response {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Result {
#[prost(message, optional, tag = "1")]
pub member_balance: ::core::option::Option<crate::models::member_balance::MemberBalance>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListMemberBalancesRequest {
#[prost(message, optional, tag = "1")]
pub pagination: ::core::option::Option<crate::protobuf::pagination::Pagination>,
#[prost(message, repeated, tag = "2")]
pub sorts: ::prost::alloc::vec::Vec<crate::protobuf::pagination::Sort>,
#[prost(message, optional, tag = "3")]
pub search: ::core::option::Option<list_member_balances_request::Search>,
}
/// Nested message and enum types in `ListMemberBalancesRequest`.
pub mod list_member_balances_request {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Search {
#[prost(string, optional, tag = "1")]
pub member_id: ::core::option::Option<::prost::alloc::string::String>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListMemberBalancesResponse {
#[prost(message, optional, tag = "1")]
pub error: ::core::option::Option<crate::protobuf::rpc::Error>,
#[prost(message, optional, tag = "2")]
pub result: ::core::option::Option<list_member_balances_response::Result>,
}
/// Nested message and enum types in `ListMemberBalancesResponse`.
pub mod list_member_balances_response {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Result {
#[prost(uint64, tag = "1")]
pub total_count: u64,
#[prost(message, repeated, tag = "2")]
pub member_balances: ::prost::alloc::vec::Vec<crate::models::member_balance::MemberBalance>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMemberBalanceRequest {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMemberBalanceResponse {
#[prost(message, optional, tag = "1")]
pub error: ::core::option::Option<crate::protobuf::rpc::Error>,
#[prost(message, optional, tag = "2")]
pub result: ::core::option::Option<get_member_balance_response::Result>,
}
/// Nested message and enum types in `GetMemberBalanceResponse`.
pub mod get_member_balance_response {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Result {
#[prost(message, optional, tag = "1")]
pub member_balance: ::core::option::Option<crate::models::member_balance::MemberBalance>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateMemberBalanceRequest {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(double, tag = "2")]
pub balance: f64,
#[prost(double, tag = "3")]
pub balance_bota: f64,
#[prost(double, tag = "4")]
pub balance_sum: f64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateMemberBalanceResponse {
#[prost(message, optional, tag = "1")]
pub error: ::core::option::Option<crate::protobuf::rpc::Error>,
#[prost(message, optional, tag = "2")]
pub result: ::core::option::Option<update_member_balance_response::Result>,
}
/// Nested message and enum types in `UpdateMemberBalanceResponse`.
pub mod update_member_balance_response {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Result {
#[prost(message, optional, tag = "1")]
pub member_balance: ::core::option::Option<crate::models::member_balance::MemberBalance>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteMemberBalanceRequest {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteMemberBalanceResponse {
#[prost(message, optional, tag = "1")]
pub error: ::core::option::Option<crate::protobuf::rpc::Error>,
#[prost(message, optional, tag = "2")]
pub result: ::core::option::Option<delete_member_balance_response::Result>,
}
/// Nested message and enum types in `DeleteMemberBalanceResponse`.
pub mod delete_member_balance_response {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Result {}
}

View File

@ -5,6 +5,7 @@ pub mod core;
pub mod frontend;
pub mod identity;
pub mod member;
pub mod member_balance;
pub mod member_bank_account;
pub mod member_bank_deposit;
pub mod member_bank_withdraw;

View File

@ -66,15 +66,17 @@ pub struct MemberModel {
#[prost(message, optional, tag = "15")]
pub member_settlement_setting:
::core::option::Option<super::member_settlement_setting::MemberSettlementSetting>,
#[prost(string, optional, tag = "16")]
#[prost(message, optional, tag = "16")]
pub member_balance: ::core::option::Option<super::member_balance::MemberBalance>,
#[prost(string, optional, tag = "17")]
pub last_signined_ip: ::core::option::Option<::prost::alloc::string::String>,
#[prost(uint64, optional, tag = "17")]
#[prost(uint64, optional, tag = "18")]
pub last_signined_at: ::core::option::Option<u64>,
#[prost(uint64, tag = "18")]
pub created_at: u64,
#[prost(uint64, tag = "19")]
pub created_at: u64,
#[prost(uint64, tag = "20")]
pub updated_at: u64,
#[prost(uint64, optional, tag = "20")]
#[prost(uint64, optional, tag = "21")]
pub deleted_at: ::core::option::Option<u64>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]

View File

@ -0,0 +1,17 @@
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MemberBalance {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub member_id: ::prost::alloc::string::String,
#[prost(double, tag = "3")]
pub balance: f64,
#[prost(double, tag = "4")]
pub balance_bota: f64,
#[prost(double, tag = "5")]
pub balance_sum: f64,
#[prost(uint64, tag = "6")]
pub created_at: u64,
#[prost(uint64, tag = "7")]
pub updated_at: u64,
}

View File

@ -2,6 +2,7 @@ pub mod api;
pub mod bank;
pub mod core;
pub mod member;
pub mod member_balance;
pub mod member_bank_account;
pub mod member_bank_deposit;
pub mod member_bank_withdraw;

206
src/ss/member_balance.rs Normal file
View File

@ -0,0 +1,206 @@
const SUBJECT: &str = "bet.beteran.ss.member_balance";
pub const SUBJECT_CREATE_MEMBER_BALANCE: &str =
const_format::concatcp!(SUBJECT, ".CreateMemberBalance");
pub const SUBJECT_LIST_MEMBER_BALANCES: &str =
const_format::concatcp!(SUBJECT, ".ListMemberBalances");
pub const SUBJECT_GET_MEMBER_BALANCE: &str = const_format::concatcp!(SUBJECT, ".GetMemberBalance");
pub const SUBJECT_UPDATE_MEMBER_BALANCE: &str =
const_format::concatcp!(SUBJECT, ".UpdateMemberBalance");
pub const SUBJECT_DELETE_MEMBER_BALANCE: &str =
const_format::concatcp!(SUBJECT, ".DeleteMemberBalance");
/// subject = bet.beteran.ss.member_balance.CreateMemberBalance
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateMemberBalanceRequest {
#[prost(message, optional, tag = "1")]
pub client: ::core::option::Option<crate::models::core::network::Client>,
#[prost(message, optional, tag = "2")]
pub request: ::core::option::Option<create_member_balance_request::Request>,
}
/// Nested message and enum types in `CreateMemberBalanceRequest`.
pub mod create_member_balance_request {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Request {
#[prost(string, tag = "1")]
pub member_id: ::prost::alloc::string::String,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateMemberBalanceResponse {
#[prost(message, optional, tag = "1")]
pub error: ::core::option::Option<crate::protobuf::rpc::Error>,
#[prost(message, optional, tag = "2")]
pub result: ::core::option::Option<create_member_balance_response::Result>,
}
/// Nested message and enum types in `CreateMemberBalanceResponse`.
pub mod create_member_balance_response {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Result {
#[prost(message, optional, tag = "1")]
pub member_balance: ::core::option::Option<crate::models::member_balance::MemberBalance>,
}
}
/// subject = bet.beteran.ss.member_balance.ListMemberBalances
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListMemberBalancesRequest {
#[prost(message, optional, tag = "1")]
pub client: ::core::option::Option<crate::models::core::network::Client>,
#[prost(message, optional, tag = "2")]
pub request: ::core::option::Option<list_member_balances_request::Request>,
}
/// Nested message and enum types in `ListMemberBalancesRequest`.
pub mod list_member_balances_request {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Request {
#[prost(message, optional, tag = "1")]
pub pagination: ::core::option::Option<crate::protobuf::pagination::Pagination>,
#[prost(message, repeated, tag = "2")]
pub sorts: ::prost::alloc::vec::Vec<crate::protobuf::pagination::Sort>,
#[prost(message, optional, tag = "3")]
pub search: ::core::option::Option<request::Search>,
}
/// 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>,
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListMemberBalancesResponse {
#[prost(message, optional, tag = "1")]
pub error: ::core::option::Option<crate::protobuf::rpc::Error>,
#[prost(message, optional, tag = "2")]
pub result: ::core::option::Option<list_member_balances_response::Result>,
}
/// Nested message and enum types in `ListMemberBalancesResponse`.
pub mod list_member_balances_response {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Result {
#[prost(uint64, tag = "1")]
pub total_count: u64,
#[prost(message, repeated, tag = "2")]
pub member_balances: ::prost::alloc::vec::Vec<crate::models::member_balance::MemberBalance>,
}
}
/// subject = bet.beteran.ss.member_balance.GetMemberBalance
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMemberBalanceRequest {
#[prost(message, optional, tag = "1")]
pub client: ::core::option::Option<crate::models::core::network::Client>,
#[prost(message, optional, tag = "2")]
pub request: ::core::option::Option<get_member_balance_request::Request>,
}
/// Nested message and enum types in `GetMemberBalanceRequest`.
pub mod get_member_balance_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 GetMemberBalanceResponse {
#[prost(message, optional, tag = "1")]
pub error: ::core::option::Option<crate::protobuf::rpc::Error>,
#[prost(message, optional, tag = "2")]
pub result: ::core::option::Option<get_member_balance_response::Result>,
}
/// Nested message and enum types in `GetMemberBalanceResponse`.
pub mod get_member_balance_response {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Result {
#[prost(message, optional, tag = "1")]
pub member_balance: ::core::option::Option<crate::models::member_balance::MemberBalance>,
}
}
/// subject = bet.beteran.ss.member_balance.UpdateMemberBalance
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateMemberBalanceRequest {
#[prost(message, optional, tag = "1")]
pub client: ::core::option::Option<crate::models::core::network::Client>,
#[prost(message, optional, tag = "2")]
pub request: ::core::option::Option<update_member_balance_request::Request>,
}
/// Nested message and enum types in `UpdateMemberBalanceRequest`.
pub mod update_member_balance_request {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Request {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(double, tag = "2")]
pub balance: f64,
#[prost(double, tag = "3")]
pub balance_bota: f64,
#[prost(double, tag = "4")]
pub balance_sum: f64,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateMemberBalanceResponse {
#[prost(message, optional, tag = "1")]
pub error: ::core::option::Option<crate::protobuf::rpc::Error>,
#[prost(message, optional, tag = "2")]
pub result: ::core::option::Option<update_member_balance_response::Result>,
}
/// Nested message and enum types in `UpdateMemberBalanceResponse`.
pub mod update_member_balance_response {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Result {
#[prost(message, optional, tag = "1")]
pub member_balance: ::core::option::Option<crate::models::member_balance::MemberBalance>,
}
}
/// subject = bet.beteran.ss.member_balance.DeleteMemberBalance
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteMemberBalanceRequest {
#[prost(message, optional, tag = "1")]
pub client: ::core::option::Option<crate::models::core::network::Client>,
#[prost(message, optional, tag = "2")]
pub request: ::core::option::Option<delete_member_balance_request::Request>,
}
/// Nested message and enum types in `DeleteMemberBalanceRequest`.
pub mod delete_member_balance_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 DeleteMemberBalanceResponse {
#[prost(message, optional, tag = "1")]
pub error: ::core::option::Option<crate::protobuf::rpc::Error>,
#[prost(message, optional, tag = "2")]
pub result: ::core::option::Option<delete_member_balance_response::Result>,
}
/// Nested message and enum types in `DeleteMemberBalanceResponse`.
pub mod delete_member_balance_response {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Result {}
}
/// subject = bet.beteran.ss_event.member_balance.AfterUpdateMemberBalance
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AfterUpdateMemberBalanceEvent {
#[prost(message, optional, tag = "1")]
pub client: ::core::option::Option<crate::models::core::network::Client>,
#[prost(message, optional, tag = "2")]
pub event: ::core::option::Option<after_update_member_balance_event::Event>,
}
/// Nested message and enum types in `AfterUpdateMemberBalanceEvent`.
pub mod after_update_member_balance_event {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Event {
#[prost(string, tag = "1")]
pub member_id: ::prost::alloc::string::String,
#[prost(double, tag = "2")]
pub balance: f64,
#[prost(double, tag = "3")]
pub balance_bota: f64,
#[prost(double, tag = "4")]
pub balance_sum: f64,
}
}

View File

@ -2,6 +2,7 @@ pub mod api;
pub mod bank;
pub mod identity;
pub mod member;
pub mod member_balance;
pub mod member_bank_account;
pub mod member_bank_deposit;
pub mod member_bank_withdraw;