refactoring

This commit is contained in:
병준 박 2022-08-11 01:04:25 +00:00
parent b5d6db061c
commit 43b7f05e5b
7 changed files with 60 additions and 8 deletions

View File

@ -15,11 +15,22 @@ message ListMembersRequest {
optional bet.protobuf.pagination.Pagination pagination = 1; optional bet.protobuf.pagination.Pagination pagination = 1;
repeated bet.protobuf.pagination.Search searches = 2; repeated bet.protobuf.pagination.Search searches = 2;
repeated bet.protobuf.pagination.Sort sorts = 3; repeated bet.protobuf.pagination.Sort sorts = 3;
optional string site_id = 4;
optional string member_class_id = 5;
optional string member_level_id = 6;
optional string referrer_member_id = 7;
optional string username_like = 8;
optional string nickname_like = 9;
optional string mobile_phone_number_like = 10;
optional string last_signined_ip = 11;
optional bet.beteran.member.MemberState state = 12;
optional uint64 deleted_at = 13;
} }
message ListMembersResponse { message ListMembersResponse {
message Result { message Result {
repeated bet.beteran.member.Member members = 1; repeated bet.beteran.member.MemberModel members = 1;
} }
optional bet.protobuf.rpc.Error error = 1; optional bet.protobuf.rpc.Error error = 1;
optional Result result = 2; optional Result result = 2;
@ -32,7 +43,7 @@ message GetMemberRequest {
message GetMemberResponse { message GetMemberResponse {
message Result { message Result {
bet.beteran.member.Member member = 1; bet.beteran.member.MemberModel member = 1;
} }
optional bet.protobuf.rpc.Error error = 1; optional bet.protobuf.rpc.Error error = 1;
optional Result result = 2; optional Result result = 2;
@ -45,7 +56,7 @@ message GetMemberByUsernameRequest {
message GetMemberByUsernameResponse { message GetMemberByUsernameResponse {
message Result { message Result {
bet.beteran.member.Member member = 1; bet.beteran.member.MemberModel member = 1;
} }
optional bet.protobuf.rpc.Error error = 1; optional bet.protobuf.rpc.Error error = 1;
optional Result result = 2; optional Result result = 2;

View File

@ -13,6 +13,12 @@ message ListSitesRequest {
optional bet.protobuf.pagination.Pagination pagination = 1; optional bet.protobuf.pagination.Pagination pagination = 1;
repeated bet.protobuf.pagination.Search searches = 2; repeated bet.protobuf.pagination.Search searches = 2;
repeated bet.protobuf.pagination.Sort sorts = 3; repeated bet.protobuf.pagination.Sort sorts = 3;
optional string url_like = 4;
optional string name_like = 5;
optional string path_like = 6;
optional bool show = 7;
optional bool can_use = 8;
optional string memo_like = 9;
} }
message ListSitesResponse { message ListSitesResponse {

View File

@ -19,6 +19,25 @@ enum MemberState {
} }
message Member { message Member {
string id = 1;
string site_id = 2;
string member_class_id = 3;
string member_level_id = 4;
optional string referrer_member_id = 5;
uint64 referred_count = 6;
string username = 7;
string nickname = 8;
optional string mobile_phone_number = 9;
MemberState state = 10;
optional uint64 state_changed_at = 11;
optional string last_signined_ip = 12;
optional uint64 last_signined_at = 13;
uint64 created_at = 14;
uint64 updated_at = 15;
optional uint64 deleted_at = 16;
}
message MemberModel {
string id = 1; string id = 1;
bet.beteran.domain.Site site = 2; bet.beteran.domain.Site site = 2;
MemberClass member_class = 3; MemberClass member_class = 3;

View File

@ -4,7 +4,7 @@ package bet.beteran.member;
message MemberClass { message MemberClass {
string id = 1; string id = 1;
optional MemberClass parent = 2; optional string parent_id = 2;
string name = 3; string name = 3;
uint64 created_at = 4; uint64 created_at = 4;
uint64 updated_at = 5; uint64 updated_at = 5;

View File

@ -5,7 +5,7 @@ package bet.beteran.member;
message MemberLevel { message MemberLevel {
string id = 1; string id = 1;
string name = 2; string name = 2;
uint32 order = 3; uint32 sort_order = 3;
uint64 created_at = 4; uint64 created_at = 4;
uint64 updated_at = 5; uint64 updated_at = 5;
optional uint64 deleted_at = 6; optional uint64 deleted_at = 6;

View File

@ -15,6 +15,12 @@ message ListSitesRequest {
optional bet.protobuf.pagination.Pagination pagination = 2; optional bet.protobuf.pagination.Pagination pagination = 2;
repeated bet.protobuf.pagination.Search searches = 3; repeated bet.protobuf.pagination.Search searches = 3;
repeated bet.protobuf.pagination.Sort sorts = 4; repeated bet.protobuf.pagination.Sort sorts = 4;
optional string url_like = 5;
optional string name_like = 6;
optional string path_like = 7;
optional bool show = 8;
optional bool can_use = 9;
optional string memo_like = 10;
} }
message ListSitesResponse { message ListSitesResponse {

View File

@ -17,11 +17,21 @@ message ListMembersRequest {
optional bet.protobuf.pagination.Pagination pagination = 2; optional bet.protobuf.pagination.Pagination pagination = 2;
repeated bet.protobuf.pagination.Search searches = 3; repeated bet.protobuf.pagination.Search searches = 3;
repeated bet.protobuf.pagination.Sort sorts = 4; repeated bet.protobuf.pagination.Sort sorts = 4;
optional string site_id = 5;
optional string member_class_id = 6;
optional string member_level_id = 7;
optional string referrer_member_id = 8;
optional string username_like = 9;
optional string nickname_like = 10;
optional string mobile_phone_number_like = 11;
optional string last_signined_ip = 12;
optional bet.beteran.member.MemberState state = 13;
optional uint64 deleted_at = 14;
} }
message ListMembersResponse { message ListMembersResponse {
message Result { message Result {
repeated bet.beteran.member.Member members = 1; repeated bet.beteran.member.MemberModel members = 1;
} }
optional bet.protobuf.rpc.Error error = 1; optional bet.protobuf.rpc.Error error = 1;
optional Result result = 2; optional Result result = 2;
@ -35,7 +45,7 @@ message GetMemberRequest {
message GetMemberResponse { message GetMemberResponse {
message Result { message Result {
bet.beteran.member.Member member = 1; bet.beteran.member.MemberModel member = 1;
} }
optional bet.protobuf.rpc.Error error = 1; optional bet.protobuf.rpc.Error error = 1;
optional Result result = 2; optional Result result = 2;
@ -49,7 +59,7 @@ message GetMemberByUsernameRequest {
message GetMemberByUsernameResponse { message GetMemberByUsernameResponse {
message Result { message Result {
bet.beteran.member.Member member = 1; bet.beteran.member.MemberModel member = 1;
} }
optional bet.protobuf.rpc.Error error = 1; optional bet.protobuf.rpc.Error error = 1;
optional Result result = 2; optional Result result = 2;