From 2dcdf5631817f9ef812d93314a43856322071d53 Mon Sep 17 00:00:00 2001 From: PARK BYUNG JUN Date: Fri, 12 Aug 2022 06:42:07 +0000 Subject: [PATCH] bank is added --- build.rs | 5 ++ proto/c2se/backend/account.proto | 4 ++ proto/c2se/backend/member.proto | 22 +++++++++ proto/c2se/common/bank.proto | 77 ++++++++++++++++++++++++++++++ proto/c2se/frontend/account.proto | 1 + proto/models/account/bank.proto | 13 +++++ proto/ss/account/bank.proto | 79 +++++++++++++++++++++++++++++++ proto/ss/member/member.proto | 20 ++++++++ 8 files changed, 221 insertions(+) create mode 100644 proto/c2se/backend/account.proto create mode 100644 proto/c2se/common/bank.proto create mode 100644 proto/c2se/frontend/account.proto create mode 100644 proto/models/account/bank.proto create mode 100644 proto/ss/account/bank.proto diff --git a/build.rs b/build.rs index 1a7c5b4..f5def43 100644 --- a/build.rs +++ b/build.rs @@ -43,6 +43,7 @@ static TARGETS: Lazy>> = Lazy::new(|| { "./proto/models/member/member_level.proto", "./proto/models/member/member.proto", "./proto/models/member/member_session.proto", + "./proto/models/account/bank.proto", ], ); @@ -51,9 +52,12 @@ static TARGETS: Lazy>> = Lazy::new(|| { vec![ "./proto/c2se/core/network.proto", "./proto/c2se/common/identity.proto", + "./proto/c2se/common/bank.proto", "./proto/c2se/backend/site.proto", + "./proto/c2se/backend/account.proto", "./proto/c2se/backend/identity.proto", "./proto/c2se/backend/member.proto", + "./proto/c2se/frontend/account.proto", "./proto/c2se/frontend/identity.proto", ], ); @@ -64,6 +68,7 @@ static TARGETS: Lazy>> = Lazy::new(|| { "./proto/ss/domain/site.proto", "./proto/ss/member/identity.proto", "./proto/ss/member/member.proto", + "./proto/ss/account/bank.proto", ], ); diff --git a/proto/c2se/backend/account.proto b/proto/c2se/backend/account.proto new file mode 100644 index 0000000..047a485 --- /dev/null +++ b/proto/c2se/backend/account.proto @@ -0,0 +1,4 @@ +// subject = bet.beteran.c2se.backend.bank.ListBanks +// subject = bet.beteran.c2se.backend.bank.CreateBank +// subject = bet.beteran.c2se.backend.bank.UpdateBank +// subject = bet.beteran.c2se.backend.bank.DeleteBank diff --git a/proto/c2se/backend/member.proto b/proto/c2se/backend/member.proto index f6d352b..89d7277 100644 --- a/proto/c2se/backend/member.proto +++ b/proto/c2se/backend/member.proto @@ -10,6 +10,26 @@ import "protobuf/pagination/sort.proto"; import "models/member/member.proto"; +// subject = bet.beteran.c2se.backend.member.CreateMember +message CreateMemberRequest { + string site_id = 1; + string member_class_id = 2; + string member_level_id = 3; + optional string referrer_member_id = 4; + string username = 5; + string nickname = 6; + optional string mobile_phone_number = 7; + bet.beteran.member.MemberState state = 8; +} + +message CreateMemberResponse { + message Result { + bet.beteran.member.MemberModel member = 1; + } + optional bet.protobuf.rpc.Error error = 1; + optional Result result = 2; +} + // subject = bet.beteran.c2se.backend.member.ListMembers message ListMembersRequest { optional bet.protobuf.pagination.Pagination pagination = 1; @@ -35,6 +55,8 @@ message ListMembersResponse { optional Result result = 2; } + + // subject = bet.beteran.c2se.backend.member.GetMember message GetMemberRequest { string id = 1; diff --git a/proto/c2se/common/bank.proto b/proto/c2se/common/bank.proto new file mode 100644 index 0000000..9c1c462 --- /dev/null +++ b/proto/c2se/common/bank.proto @@ -0,0 +1,77 @@ +syntax = "proto3"; + +package bet.beteran.c2se.common.bank; + +import "protobuf/rpc/error.proto"; +import "protobuf/pagination/pagination.proto"; +import "protobuf/pagination/search.proto"; +import "protobuf/pagination/sort.proto"; +import "models/account/bank.proto"; + +// subject = bet.beteran.c2se.common.bank.CreateBank +message CreateBankRequest { + string name = 1; + bool show = 2; + bool can_use = 3; + optional string memo = 4; + optional uint64 expires_at = 5; +} + +message CreateBankResponse { + message Result { + bet.beteran.account.Bank bank = 1; + } + optional bet.protobuf.rpc.Error error = 1; + optional Result result = 2; +} + + +// subject = bet.beteran.c2se.common.bank.ListBanks +message ListBanksRequest { + optional bet.protobuf.pagination.Pagination pagination = 1; + repeated bet.protobuf.pagination.Search searches = 2; + repeated bet.protobuf.pagination.Sort sorts = 3; + optional string name_like = 4; + optional bool show = 5; + optional bool can_use = 6; + optional string memo_like = 7; +} + +message ListBanksResponse { + message Result { + repeated bet.beteran.account.Bank banks = 1; + } + optional bet.protobuf.rpc.Error error = 1; + optional Result result = 2; +} + + +// subject = bet.beteran.c2se.common.bank.UpdateBank +message UpdateBankRequest { + string id = 1; + string name = 2; + bool show = 3; + bool can_use = 4; + optional string memo = 5; +} + +message UpdateBankResponse { + message Result { + bet.beteran.account.Bank bank = 1; + } + optional bet.protobuf.rpc.Error error = 1; + optional Result result = 2; +} + + +// subject = bet.beteran.c2se.common.bank.DeleteBank +message DeleteBankRequest { + string id = 1; +} + +message DeleteBankResponse { + message Result { + } + optional bet.protobuf.rpc.Error error = 1; + optional Result result = 2; +} diff --git a/proto/c2se/frontend/account.proto b/proto/c2se/frontend/account.proto new file mode 100644 index 0000000..73c001b --- /dev/null +++ b/proto/c2se/frontend/account.proto @@ -0,0 +1 @@ +// subject = bet.beteran.c2se.frontend.bank.ListBanks diff --git a/proto/models/account/bank.proto b/proto/models/account/bank.proto new file mode 100644 index 0000000..b0c378a --- /dev/null +++ b/proto/models/account/bank.proto @@ -0,0 +1,13 @@ +syntax = "proto3"; + +package bet.beteran.account; + +message Bank { + string id = 1; + string name = 2; + bool show = 3; + bool can_use = 4; + optional string memo = 5; + uint64 created_at = 6; + uint64 updated_at = 7; +} diff --git a/proto/ss/account/bank.proto b/proto/ss/account/bank.proto new file mode 100644 index 0000000..a355b74 --- /dev/null +++ b/proto/ss/account/bank.proto @@ -0,0 +1,79 @@ +syntax = "proto3"; + +package bet.beteran.ss.account.bank; + +import "protobuf/rpc/error.proto"; +import "protobuf/pagination/pagination.proto"; +import "protobuf/pagination/search.proto"; +import "protobuf/pagination/sort.proto"; +import "models/core/network.proto"; +import "models/account/bank.proto"; + +// subject = bet.beteran.ss.account.bank.ListBanks; +message ListBanksRequest { + bet.beteran.core.network.Client client = 1; + optional bet.protobuf.pagination.Pagination pagination = 2; + repeated bet.protobuf.pagination.Search searches = 3; + repeated bet.protobuf.pagination.Sort sorts = 4; + optional string name_like = 5; + optional bool show = 6; + optional bool can_use = 7; + optional string memo_like = 8; +} + +message ListBanksResponse { + message Result { + repeated bet.beteran.account.Bank banks = 1; + } + optional bet.protobuf.rpc.Error error = 1; + optional Result result = 2; +} + +// subject = bet.beteran.ss.account.bank.CreateBank; +message CreateBankRequest { + bet.beteran.core.network.Client client = 1; + string name = 2; + bool show = 3; + bool can_use = 4; + optional string memo = 5; +} + +message CreateBankResponse { + message Result { + bet.beteran.account.Bank bank = 1; + } + optional bet.protobuf.rpc.Error error = 1; + optional Result result = 2; +} + +// subject = bet.beteran.ss.account.bank.UpdateBank +message UpdateBankRequest { + bet.beteran.core.network.Client client = 1; + string id = 2; + string name = 3; + bool show = 4; + bool can_use = 5; + optional string memo = 6; +} + +message UpdateBankResponse { + message Result { + bet.beteran.account.Bank bank = 1; + } + optional bet.protobuf.rpc.Error error = 1; + optional Result result = 2; +} + + +// subject = bet.beteran.ss.account.bank.DeleteBank +message DeleteBankRequest { + bet.beteran.core.network.Client client = 1; + string id = 2; +} + +message DeleteBankResponse { + message Result { + } + optional bet.protobuf.rpc.Error error = 1; + optional Result result = 2; +} diff --git a/proto/ss/member/member.proto b/proto/ss/member/member.proto index cd95968..f889313 100644 --- a/proto/ss/member/member.proto +++ b/proto/ss/member/member.proto @@ -10,6 +10,26 @@ import "protobuf/pagination/sort.proto"; import "models/member/member.proto"; +// subject = bet.beteran.ss.member.CreateMember +message CreateMemberRequest { + bet.beteran.core.network.Client client = 1; + string site_id = 2; + string member_class_id = 3; + string member_level_id = 4; + optional string referrer_member_id = 5; + string username = 6; + string nickname = 7; + optional string mobile_phone_number = 8; + bet.beteran.member.MemberState state = 9; +} + +message CreateMemberResponse { + message Result { + bet.beteran.member.MemberModel member = 1; + } + optional bet.protobuf.rpc.Error error = 1; + optional Result result = 2; +} // subject = bet.beteran.ss.member.ListMembers message ListMembersRequest {