From a28289f910ee008cbe8bd62faab962ae0e4a2226 Mon Sep 17 00:00:00 2001 From: PARK BYUNG JUN Date: Thu, 18 Aug 2022 03:40:03 +0000 Subject: [PATCH] vendor is added --- build.rs | 4 ++++ proto/c2se/api/vendor.proto | 31 ++++++++++++++++++++++++ proto/c2se/backend/api/vendor.proto | 5 ++++ proto/models/api/vendor.proto | 18 ++++++++++++++ proto/ss/api/vendor.proto | 37 +++++++++++++++++++++++++++++ 5 files changed, 95 insertions(+) create mode 100644 proto/c2se/api/vendor.proto create mode 100644 proto/c2se/backend/api/vendor.proto create mode 100644 proto/models/api/vendor.proto create mode 100644 proto/ss/api/vendor.proto diff --git a/build.rs b/build.rs index 8f6577f..a0494c2 100644 --- a/build.rs +++ b/build.rs @@ -47,6 +47,7 @@ static TARGETS: Lazy>> = Lazy::new(|| { "./proto/models/resource.proto", "./proto/models/role.proto", "./proto/models/site.proto", + "./proto/models/api/vendor.proto", ], ); @@ -63,6 +64,7 @@ static TARGETS: Lazy>> = Lazy::new(|| { "./proto/c2se/member.proto", "./proto/c2se/site.proto", "./proto/c2se/core/network.proto", + "./proto/c2se/api/vendor.proto", "./proto/c2se/backend/bank.proto", "./proto/c2se/backend/identity.proto", "./proto/c2se/backend/member_bank_account.proto", @@ -72,6 +74,7 @@ static TARGETS: Lazy>> = Lazy::new(|| { "./proto/c2se/backend/member_level.proto", "./proto/c2se/backend/member.proto", "./proto/c2se/backend/site.proto", + "./proto/c2se/backend/api/vendor.proto", "./proto/c2se/frontend/bank.proto", "./proto/c2se/frontend/identity.proto", ], @@ -89,6 +92,7 @@ static TARGETS: Lazy>> = Lazy::new(|| { "./proto/ss/member_level.proto", "./proto/ss/member.proto", "./proto/ss/site.proto", + "./proto/ss/api/vendor.proto", ], ); diff --git a/proto/c2se/api/vendor.proto b/proto/c2se/api/vendor.proto new file mode 100644 index 0000000..5a21b85 --- /dev/null +++ b/proto/c2se/api/vendor.proto @@ -0,0 +1,31 @@ +syntax = "proto3"; + +package bet.beteran.c2se.api.vendor; + +import "protobuf/rpc.proto"; +import "protobuf/pagination.proto"; +import "models/core/network.proto"; + +import "models/api/vendor.proto"; + +message ListVendorsRequest { + message Search { + optional uint64 company_id = 1; + optional uint64 vendor_id = 2; + optional string key_like = 3; + optional string name_like = 4; + optional string category_like = 5; + optional string is_enable = 6; + } + optional bet.protobuf.pagination.Pagination pagination = 1; + repeated bet.protobuf.pagination.Sort sorts = 2; + optional Search search = 3; +} + +message ListVendorsResponse { + message Result { + repeated bet.beteran.api.vendor.Vendor vendors = 1; + } + optional bet.protobuf.rpc.Error error = 1; + optional Result result = 2; +} diff --git a/proto/c2se/backend/api/vendor.proto b/proto/c2se/backend/api/vendor.proto new file mode 100644 index 0000000..0b42d8b --- /dev/null +++ b/proto/c2se/backend/api/vendor.proto @@ -0,0 +1,5 @@ +syntax = "proto3"; + +package bet.beteran.c2se.backend.api.vendor; + +// subject = bet.beteran.c2se.backend.api.vendor.ListVendors diff --git a/proto/models/api/vendor.proto b/proto/models/api/vendor.proto new file mode 100644 index 0000000..8a7a0d9 --- /dev/null +++ b/proto/models/api/vendor.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; + +package bet.beteran.api.vendor; + +message Vendor { + uint64 id = 1; + uint64 company_id = 2; + uint64 vendor_id = 3; + string key = 4; + string name = 5; + string category = 6; + uint64 max_bet_casino = 7; + uint64 max_bet_slot = 8; + string is_enable = 9; + uint64 bet_count = 10; + uint64 created_at = 11; + uint64 updated_at = 12; +} diff --git a/proto/ss/api/vendor.proto b/proto/ss/api/vendor.proto new file mode 100644 index 0000000..a524989 --- /dev/null +++ b/proto/ss/api/vendor.proto @@ -0,0 +1,37 @@ +syntax = "proto3"; + +package bet.beteran.ss.api.vendor; + +import "protobuf/rpc.proto"; +import "protobuf/pagination.proto"; +import "models/core/network.proto"; + +import "models/api/vendor.proto"; + + +// subject = bet.beteran.ss.api.vendor.ListVendors +message ListVendorsRequest { + message Request { + message Search { + optional uint64 company_id = 1; + optional uint64 vendor_id = 2; + optional string key_like = 3; + optional string name_like = 4; + optional string category_like = 5; + optional string is_enable = 6; + } + 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 ListVendorsResponse { + message Result { + repeated bet.beteran.api.vendor.Vendor vendors = 1; + } + optional bet.protobuf.rpc.Error error = 1; + optional Result result = 2; +}