member_balance is added
This commit is contained in:
parent
d238f024d8
commit
8300d6a9d5
5
build.rs
5
build.rs
|
@ -34,6 +34,7 @@ static TARGETS: Lazy<HashMap<&str, Vec<&str>>> = Lazy::new(|| {
|
||||||
vec![
|
vec![
|
||||||
"./proto/models/core/network.proto",
|
"./proto/models/core/network.proto",
|
||||||
"./proto/models/bank.proto",
|
"./proto/models/bank.proto",
|
||||||
|
"./proto/models/member_balance.proto",
|
||||||
"./proto/models/member_bank_account.proto",
|
"./proto/models/member_bank_account.proto",
|
||||||
"./proto/models/member_bank_deposit.proto",
|
"./proto/models/member_bank_deposit.proto",
|
||||||
"./proto/models/member_bank_withdraw.proto",
|
"./proto/models/member_bank_withdraw.proto",
|
||||||
|
@ -61,6 +62,7 @@ static TARGETS: Lazy<HashMap<&str, Vec<&str>>> = Lazy::new(|| {
|
||||||
vec![
|
vec![
|
||||||
"./proto/c2se/bank.proto",
|
"./proto/c2se/bank.proto",
|
||||||
"./proto/c2se/identity.proto",
|
"./proto/c2se/identity.proto",
|
||||||
|
"./proto/c2se/member_balance.proto",
|
||||||
"./proto/c2se/member_bank_account.proto",
|
"./proto/c2se/member_bank_account.proto",
|
||||||
"./proto/c2se/member_bank_deposit.proto",
|
"./proto/c2se/member_bank_deposit.proto",
|
||||||
"./proto/c2se/member_bank_withdraw.proto",
|
"./proto/c2se/member_bank_withdraw.proto",
|
||||||
|
@ -77,6 +79,7 @@ static TARGETS: Lazy<HashMap<&str, Vec<&str>>> = Lazy::new(|| {
|
||||||
"./proto/c2se/api/betting.proto",
|
"./proto/c2se/api/betting.proto",
|
||||||
"./proto/c2se/backend/bank.proto",
|
"./proto/c2se/backend/bank.proto",
|
||||||
"./proto/c2se/backend/identity.proto",
|
"./proto/c2se/backend/identity.proto",
|
||||||
|
"./proto/c2se/backend/member_balance.proto",
|
||||||
"./proto/c2se/backend/member_bank_account.proto",
|
"./proto/c2se/backend/member_bank_account.proto",
|
||||||
"./proto/c2se/backend/member_bank_deposit.proto",
|
"./proto/c2se/backend/member_bank_deposit.proto",
|
||||||
"./proto/c2se/backend/member_bank_withdraw.proto",
|
"./proto/c2se/backend/member_bank_withdraw.proto",
|
||||||
|
@ -92,6 +95,7 @@ static TARGETS: Lazy<HashMap<&str, Vec<&str>>> = Lazy::new(|| {
|
||||||
"./proto/c2se/backend/api/betting.proto",
|
"./proto/c2se/backend/api/betting.proto",
|
||||||
"./proto/c2se/frontend/bank.proto",
|
"./proto/c2se/frontend/bank.proto",
|
||||||
"./proto/c2se/frontend/identity.proto",
|
"./proto/c2se/frontend/identity.proto",
|
||||||
|
"./proto/c2se/frontend/member_balance.proto",
|
||||||
"./proto/c2se/frontend/member_bank_account.proto",
|
"./proto/c2se/frontend/member_bank_account.proto",
|
||||||
"./proto/c2se/frontend/member_bank_deposit.proto",
|
"./proto/c2se/frontend/member_bank_deposit.proto",
|
||||||
"./proto/c2se/frontend/member_bank_withdraw.proto",
|
"./proto/c2se/frontend/member_bank_withdraw.proto",
|
||||||
|
@ -107,6 +111,7 @@ static TARGETS: Lazy<HashMap<&str, Vec<&str>>> = Lazy::new(|| {
|
||||||
vec![
|
vec![
|
||||||
"./proto/ss/bank.proto",
|
"./proto/ss/bank.proto",
|
||||||
"./proto/ss/identity.proto",
|
"./proto/ss/identity.proto",
|
||||||
|
"./proto/ss/member_balance.proto",
|
||||||
"./proto/ss/member_bank_account.proto",
|
"./proto/ss/member_bank_account.proto",
|
||||||
"./proto/ss/member_bank_deposit.proto",
|
"./proto/ss/member_bank_deposit.proto",
|
||||||
"./proto/ss/member_bank_withdraw.proto",
|
"./proto/ss/member_bank_withdraw.proto",
|
||||||
|
|
9
proto/c2se/backend/member_balance.proto
Normal file
9
proto/c2se/backend/member_balance.proto
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package bet.beteran.c2se.backend.member_balance;
|
||||||
|
|
||||||
|
// subject = bet.beteran.c2se.backend.member_balance.CreateMemberBalance
|
||||||
|
// subject = bet.beteran.c2se.backend.member_balance.ListMemberBalances
|
||||||
|
// subject = bet.beteran.c2se.backend.member_balance.GetMemberBalance
|
||||||
|
// subject = bet.beteran.c2se.backend.member_balance.UpdateMemberBalance
|
||||||
|
// subject = bet.beteran.c2se.backend.member_balance.DeleteMemberBalance
|
7
proto/c2se/frontend/member_balance.proto
Normal file
7
proto/c2se/frontend/member_balance.proto
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package bet.beteran.c2se.frontend.member_balance;
|
||||||
|
|
||||||
|
// subject = bet.beteran.c2se.frontend.member_balance.CreateMemberBalance
|
||||||
|
// subject = bet.beteran.c2se.frontend.member_balance.GetMemberBalance
|
||||||
|
// subject = bet.beteran.c2se.frontend.member_balance.UpdateMemberBalance
|
77
proto/c2se/member_balance.proto
Normal file
77
proto/c2se/member_balance.proto
Normal file
|
@ -0,0 +1,77 @@
|
||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package bet.beteran.c2se.member_balance;
|
||||||
|
|
||||||
|
import "protobuf/rpc.proto";
|
||||||
|
import "protobuf/pagination.proto";
|
||||||
|
|
||||||
|
import "models/member_balance.proto";
|
||||||
|
|
||||||
|
message CreateMemberBalanceRequest {
|
||||||
|
string member_id = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message CreateMemberBalanceResponse {
|
||||||
|
message Result {
|
||||||
|
bet.beteran.member_balance.MemberBalance member_balance = 1;
|
||||||
|
}
|
||||||
|
optional bet.protobuf.rpc.Error error = 1;
|
||||||
|
optional Result result = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ListMemberBalancesRequest {
|
||||||
|
message Search {
|
||||||
|
optional string member_id = 1;
|
||||||
|
}
|
||||||
|
optional bet.protobuf.pagination.Pagination pagination = 1;
|
||||||
|
repeated bet.protobuf.pagination.Sort sorts = 2;
|
||||||
|
optional Search search = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ListMemberBalancesResponse {
|
||||||
|
message Result {
|
||||||
|
uint64 total_count = 1;
|
||||||
|
repeated bet.beteran.member_balance.MemberBalance member_balances = 2;
|
||||||
|
}
|
||||||
|
optional bet.protobuf.rpc.Error error = 1;
|
||||||
|
optional Result result = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetMemberBalanceRequest {
|
||||||
|
string id = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetMemberBalanceResponse {
|
||||||
|
message Result {
|
||||||
|
bet.beteran.member_balance.MemberBalance member_balance = 1;
|
||||||
|
}
|
||||||
|
optional bet.protobuf.rpc.Error error = 1;
|
||||||
|
optional Result result = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message UpdateMemberBalanceRequest {
|
||||||
|
string id = 1;
|
||||||
|
double balance = 2;
|
||||||
|
double balance_bota = 3;
|
||||||
|
double balance_sum = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message UpdateMemberBalanceResponse {
|
||||||
|
message Result {
|
||||||
|
bet.beteran.member_balance.MemberBalance member_balance = 1;
|
||||||
|
}
|
||||||
|
optional bet.protobuf.rpc.Error error = 1;
|
||||||
|
optional Result result = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message DeleteMemberBalanceRequest {
|
||||||
|
string id = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DeleteMemberBalanceResponse {
|
||||||
|
message Result {
|
||||||
|
}
|
||||||
|
optional bet.protobuf.rpc.Error error = 1;
|
||||||
|
optional Result result = 2;
|
||||||
|
}
|
|
@ -9,6 +9,7 @@ import "models/member_class.proto";
|
||||||
import "models/member_level.proto";
|
import "models/member_level.proto";
|
||||||
import "models/member_game_setting.proto";
|
import "models/member_game_setting.proto";
|
||||||
import "models/member_settlement_setting.proto";
|
import "models/member_settlement_setting.proto";
|
||||||
|
import "models/member_balance.proto";
|
||||||
|
|
||||||
|
|
||||||
enum MemberState {
|
enum MemberState {
|
||||||
|
@ -48,17 +49,19 @@ message MemberModel {
|
||||||
optional bet.beteran.member_bank_account.MemberBankAccountModel bank_account = 5;
|
optional bet.beteran.member_bank_account.MemberBankAccountModel bank_account = 5;
|
||||||
optional MemberModel parent_member = 6;
|
optional MemberModel parent_member = 6;
|
||||||
uint64 child_member_count = 7;
|
uint64 child_member_count = 7;
|
||||||
string username = 8;
|
repeated uint64 children_count = 8;
|
||||||
string nickname = 9;
|
string username = 9;
|
||||||
optional string mobile_phone_number = 10;
|
string nickname = 10;
|
||||||
MemberState state = 11;
|
optional string mobile_phone_number = 11;
|
||||||
optional uint64 state_changed_at = 12;
|
MemberState state = 12;
|
||||||
optional bet.beteran.member_game_setting.MemberGameSetting member_game_setting = 13;
|
optional uint64 state_changed_at = 13;
|
||||||
optional bet.beteran.member_settlement_setting.MemberSettlementSetting member_settlement_setting = 14;
|
optional bet.beteran.member_game_setting.MemberGameSetting member_game_setting = 14;
|
||||||
optional string last_signined_ip = 15;
|
optional bet.beteran.member_settlement_setting.MemberSettlementSetting member_settlement_setting = 15;
|
||||||
optional uint64 last_signined_at = 16;
|
optional bet.beteran.member_balance.MemberBalance member_balance = 16;
|
||||||
uint64 created_at = 17;
|
optional string last_signined_ip = 17;
|
||||||
uint64 updated_at = 18;
|
optional uint64 last_signined_at = 18;
|
||||||
optional uint64 deleted_at = 19;
|
uint64 created_at = 19;
|
||||||
|
uint64 updated_at = 20;
|
||||||
|
optional uint64 deleted_at = 21;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
13
proto/models/member_balance.proto
Normal file
13
proto/models/member_balance.proto
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package bet.beteran.member_balance;
|
||||||
|
|
||||||
|
message MemberBalance {
|
||||||
|
string id = 1;
|
||||||
|
string member_id = 2;
|
||||||
|
double balance = 3;
|
||||||
|
double balance_bota = 4;
|
||||||
|
double balance_sum = 5;
|
||||||
|
uint64 created_at = 6;
|
||||||
|
uint64 updated_at = 7;
|
||||||
|
}
|
115
proto/ss/member_balance.proto
Normal file
115
proto/ss/member_balance.proto
Normal file
|
@ -0,0 +1,115 @@
|
||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package bet.beteran.ss.member_balance;
|
||||||
|
|
||||||
|
import "models/core/network.proto";
|
||||||
|
import "protobuf/rpc.proto";
|
||||||
|
import "protobuf/pagination.proto";
|
||||||
|
import "models/member_balance.proto";
|
||||||
|
|
||||||
|
// subject = bet.beteran.ss.member_balance.CreateMemberBalance
|
||||||
|
message CreateMemberBalanceRequest {
|
||||||
|
message Request {
|
||||||
|
string member_id = 1;
|
||||||
|
}
|
||||||
|
bet.beteran.core.network.Client client = 1;
|
||||||
|
Request request = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message CreateMemberBalanceResponse {
|
||||||
|
message Result {
|
||||||
|
bet.beteran.member_balance.MemberBalance member_balance = 1;
|
||||||
|
}
|
||||||
|
optional bet.protobuf.rpc.Error error = 1;
|
||||||
|
optional Result result = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// subject = bet.beteran.ss.member_balance.ListMemberBalances
|
||||||
|
message ListMemberBalancesRequest {
|
||||||
|
message Request {
|
||||||
|
message Search {
|
||||||
|
optional string member_id = 1;
|
||||||
|
}
|
||||||
|
optional bet.protobuf.pagination.Pagination pagination = 1;
|
||||||
|
repeated bet.protobuf.pagination.Sort sorts = 2;
|
||||||
|
optional Search search = 3;
|
||||||
|
}
|
||||||
|
bet.beteran.core.network.Client client = 1;
|
||||||
|
Request request = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ListMemberBalancesResponse {
|
||||||
|
message Result {
|
||||||
|
uint64 total_count = 1;
|
||||||
|
repeated bet.beteran.member_balance.MemberBalance member_balances = 2;
|
||||||
|
}
|
||||||
|
optional bet.protobuf.rpc.Error error = 1;
|
||||||
|
optional Result result = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// subject = bet.beteran.ss.member_balance.GetMemberBalance
|
||||||
|
message GetMemberBalanceRequest {
|
||||||
|
message Request {
|
||||||
|
string id = 1;
|
||||||
|
}
|
||||||
|
bet.beteran.core.network.Client client = 1;
|
||||||
|
Request request = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetMemberBalanceResponse {
|
||||||
|
message Result {
|
||||||
|
bet.beteran.member_balance.MemberBalance member_balance = 1;
|
||||||
|
}
|
||||||
|
optional bet.protobuf.rpc.Error error = 1;
|
||||||
|
optional Result result = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// subject = bet.beteran.ss.member_balance.UpdateMemberBalance
|
||||||
|
message UpdateMemberBalanceRequest {
|
||||||
|
message Request {
|
||||||
|
string id = 1;
|
||||||
|
double balance = 2;
|
||||||
|
double balance_bota = 3;
|
||||||
|
double balance_sum = 4;
|
||||||
|
|
||||||
|
}
|
||||||
|
bet.beteran.core.network.Client client = 1;
|
||||||
|
Request request = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message UpdateMemberBalanceResponse {
|
||||||
|
message Result {
|
||||||
|
bet.beteran.member_balance.MemberBalance member_balance = 1;
|
||||||
|
}
|
||||||
|
optional bet.protobuf.rpc.Error error = 1;
|
||||||
|
optional Result result = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// subject = bet.beteran.ss.member_balance.DeleteMemberBalance
|
||||||
|
message DeleteMemberBalanceRequest {
|
||||||
|
message Request {
|
||||||
|
string id = 1;
|
||||||
|
}
|
||||||
|
bet.beteran.core.network.Client client = 1;
|
||||||
|
Request request = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DeleteMemberBalanceResponse {
|
||||||
|
message Result {
|
||||||
|
}
|
||||||
|
optional bet.protobuf.rpc.Error error = 1;
|
||||||
|
optional Result result = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// subject = bet.beteran.ss_event.member_balance.AfterUpdateMemberBalance
|
||||||
|
message AfterUpdateMemberBalanceEvent {
|
||||||
|
message Event {
|
||||||
|
string member_id = 1;
|
||||||
|
double balance = 2;
|
||||||
|
double balance_bota = 3;
|
||||||
|
double balance_sum = 4;
|
||||||
|
}
|
||||||
|
bet.beteran.core.network.Client client = 1;
|
||||||
|
Event event = 2;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user