From b5d6db061cb99ffaa65e3d207feccf023b95e7eb Mon Sep 17 00:00:00 2001 From: PARK BYUNG JUN Date: Wed, 10 Aug 2022 10:13:09 +0000 Subject: [PATCH] member is added --- build.rs | 1 + proto/models/member/member.proto | 2 +- proto/models/rbac/role.proto | 2 -- proto/ss/member/member.proto | 56 ++++++++++++++++++++++++++++++++ 4 files changed, 58 insertions(+), 3 deletions(-) create mode 100644 proto/ss/member/member.proto diff --git a/build.rs b/build.rs index 077ebba..1a7c5b4 100644 --- a/build.rs +++ b/build.rs @@ -63,6 +63,7 @@ static TARGETS: Lazy>> = Lazy::new(|| { vec![ "./proto/ss/domain/site.proto", "./proto/ss/member/identity.proto", + "./proto/ss/member/member.proto", ], ); diff --git a/proto/models/member/member.proto b/proto/models/member/member.proto index bbcb4fd..784d735 100644 --- a/proto/models/member/member.proto +++ b/proto/models/member/member.proto @@ -23,7 +23,7 @@ message Member { bet.beteran.domain.Site site = 2; MemberClass member_class = 3; MemberLevel member_level = 4; - optional Member referrer = 5; + optional Member referrer_member = 5; uint64 referred_count = 6; string username = 7; string nickname = 8; diff --git a/proto/models/rbac/role.proto b/proto/models/rbac/role.proto index ce9ddf5..076cca4 100644 --- a/proto/models/rbac/role.proto +++ b/proto/models/rbac/role.proto @@ -2,8 +2,6 @@ syntax = "proto3"; package bet.beteran.rbac; -import "models/rbac/resource.proto"; - message Role { string id = 1; Role parent = 2; diff --git a/proto/ss/member/member.proto b/proto/ss/member/member.proto new file mode 100644 index 0000000..aac6340 --- /dev/null +++ b/proto/ss/member/member.proto @@ -0,0 +1,56 @@ +syntax = "proto3"; + +package bet.beteran.ss.member; + +import "protobuf/rpc/error.proto"; +import "models/core/network.proto"; +import "protobuf/pagination/pagination.proto"; +import "protobuf/pagination/search.proto"; +import "protobuf/pagination/sort.proto"; + +import "models/member/member.proto"; + + +// subject = bet.beteran.ss.member.ListMembers +message ListMembersRequest { + 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; +} + +message ListMembersResponse { + message Result { + repeated bet.beteran.member.Member members = 1; + } + optional bet.protobuf.rpc.Error error = 1; + optional Result result = 2; +} + +// subject = bet.beteran.ss.member.GetMember +message GetMemberRequest { + bet.beteran.core.network.Client client = 1; + string id = 2; +} + +message GetMemberResponse { + message Result { + bet.beteran.member.Member member = 1; + } + optional bet.protobuf.rpc.Error error = 1; + optional Result result = 2; +} + +// subject = bet.beteran.ss.member.GetMemberByUsername +message GetMemberByUsernameRequest { + bet.beteran.core.network.Client client = 1; + string username = 2; +} + +message GetMemberByUsernameResponse { + message Result { + bet.beteran.member.Member member = 1; + } + optional bet.protobuf.rpc.Error error = 1; + optional Result result = 2; +}