diff --git a/build.rs b/build.rs index f5def43..ec3f3ca 100644 --- a/build.rs +++ b/build.rs @@ -56,6 +56,8 @@ static TARGETS: Lazy>> = Lazy::new(|| { "./proto/c2se/backend/site.proto", "./proto/c2se/backend/account.proto", "./proto/c2se/backend/identity.proto", + "./proto/c2se/backend/member_class.proto", + "./proto/c2se/backend/member_level.proto", "./proto/c2se/backend/member.proto", "./proto/c2se/frontend/account.proto", "./proto/c2se/frontend/identity.proto", diff --git a/proto/c2se/backend/member.proto b/proto/c2se/backend/member.proto index 89d7277..4d52dc3 100644 --- a/proto/c2se/backend/member.proto +++ b/proto/c2se/backend/member.proto @@ -15,11 +15,12 @@ message CreateMemberRequest { string site_id = 1; string member_class_id = 2; string member_level_id = 3; - optional string referrer_member_id = 4; + optional string referrer_member_username = 4; string username = 5; - string nickname = 6; - optional string mobile_phone_number = 7; - bet.beteran.member.MemberState state = 8; + string password = 6; + string nickname = 7; + optional string mobile_phone_number = 8; + bet.beteran.member.MemberState state = 9; } message CreateMemberResponse { diff --git a/proto/c2se/backend/member_class.proto b/proto/c2se/backend/member_class.proto new file mode 100644 index 0000000..14684d4 --- /dev/null +++ b/proto/c2se/backend/member_class.proto @@ -0,0 +1,83 @@ +syntax = "proto3"; + +package bet.beteran.c2se.backend.member_class; + +import "protobuf/rpc/error.proto"; +import "protobuf/pagination/pagination.proto"; +import "protobuf/pagination/search.proto"; +import "protobuf/pagination/sort.proto"; + +import "models/member/member_class.proto"; + + +// subject = bet.beteran.c2se.backend.member_class.CreateMemberClass +message CreateMemberClassRequest { + optional string parent_id = 1; + string name = 2; +} + +message CreateMemberClassResponse { + message Result { + bet.beteran.member.MemberClass member_class = 1; + } + optional bet.protobuf.rpc.Error error = 1; + optional Result result = 2; +} + +// subject = bet.beteran.c2se.backend.member_class.ListMemberClasses +message ListMemberClassesRequest { + 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 = 8; +} + +message ListMemberClasssResponse { + message Result { + repeated bet.beteran.member.MemberClass member_classes = 1; + } + optional bet.protobuf.rpc.Error error = 1; + optional Result result = 2; +} + + + +// subject = bet.beteran.c2se.backend.member_class.GetMemberClass +message GetMemberClassRequest { + string id = 1; +} + +message GetMemberClassResponse { + message Result { + bet.beteran.member.MemberClass member_class = 1; + } + optional bet.protobuf.rpc.Error error = 1; + optional Result result = 2; +} + +// subject = bet.beteran.c2se.backend.member_class.UpdateMemberClass +message UpdateMemberClassRequest { + string id = 1; + optional string parent_id = 2; + string name = 3; +} + +message UpdateMemberClassResponse { + message Result { + bet.beteran.member.MemberClass member_class = 1; + } + optional bet.protobuf.rpc.Error error = 1; + optional Result result = 2; +} + +// subject = bet.beteran.c2se.backend.member_class.DeleteMemberClass +message DeleteMemberClassRequest { + string id = 1; +} + +message DeleteMemberClassResponse { + message Result { + } + optional bet.protobuf.rpc.Error error = 1; + optional Result result = 2; +} diff --git a/proto/c2se/backend/member_level.proto b/proto/c2se/backend/member_level.proto new file mode 100644 index 0000000..12946de --- /dev/null +++ b/proto/c2se/backend/member_level.proto @@ -0,0 +1,83 @@ +syntax = "proto3"; + +package bet.beteran.c2se.backend.member_level; + +import "protobuf/rpc/error.proto"; +import "protobuf/pagination/pagination.proto"; +import "protobuf/pagination/search.proto"; +import "protobuf/pagination/sort.proto"; + +import "models/member/member_level.proto"; + + +// subject = bet.beteran.c2se.backend.member_level.CreateMemberLevel +message CreateMemberLevelRequest { + string name = 2; + uint32 sort_order = 3; +} + +message CreateMemberLevelResponse { + message Result { + bet.beteran.member.MemberLevel member_level = 1; + } + optional bet.protobuf.rpc.Error error = 1; + optional Result result = 2; +} + +// subject = bet.beteran.c2se.backend.member_level.ListMemberLeveles +message ListMemberLevelesRequest { + 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 = 8; +} + +message ListMemberLevelsResponse { + message Result { + repeated bet.beteran.member.MemberLevel member_levels = 1; + } + optional bet.protobuf.rpc.Error error = 1; + optional Result result = 2; +} + + + +// subject = bet.beteran.c2se.backend.member_level.GetMemberLevel +message GetMemberLevelRequest { + string id = 1; +} + +message GetMemberLevelResponse { + message Result { + bet.beteran.member.MemberLevel member_level = 1; + } + optional bet.protobuf.rpc.Error error = 1; + optional Result result = 2; +} + +// subject = bet.beteran.c2se.backend.member_level.UpdateMemberLevel +message UpdateMemberLevelRequest { + string id = 1; + optional string parent_id = 2; + string name = 3; +} + +message UpdateMemberLevelResponse { + message Result { + bet.beteran.member.MemberLevel member_level = 1; + } + optional bet.protobuf.rpc.Error error = 1; + optional Result result = 2; +} + +// subject = bet.beteran.c2se.backend.member_level.DeleteMemberLevel +message DeleteMemberLevelRequest { + string id = 1; +} + +message DeleteMemberLevelResponse { + message Result { + } + optional bet.protobuf.rpc.Error error = 1; + optional Result result = 2; +} diff --git a/proto/models/member/member_class.proto b/proto/models/member/member_class.proto index 051607c..8c8b302 100644 --- a/proto/models/member/member_class.proto +++ b/proto/models/member/member_class.proto @@ -8,5 +8,4 @@ message MemberClass { string name = 3; uint64 created_at = 4; uint64 updated_at = 5; - optional uint64 deleted_at = 6; } diff --git a/proto/models/member/member_level.proto b/proto/models/member/member_level.proto index 17312ff..1b43eef 100644 --- a/proto/models/member/member_level.proto +++ b/proto/models/member/member_level.proto @@ -8,5 +8,4 @@ message MemberLevel { uint32 sort_order = 3; uint64 created_at = 4; uint64 updated_at = 5; - optional uint64 deleted_at = 6; } diff --git a/proto/ss/member/member.proto b/proto/ss/member/member.proto index f889313..62c66ad 100644 --- a/proto/ss/member/member.proto +++ b/proto/ss/member/member.proto @@ -16,11 +16,12 @@ message CreateMemberRequest { string site_id = 2; string member_class_id = 3; string member_level_id = 4; - optional string referrer_member_id = 5; + optional string referrer_member_username = 5; string username = 6; - string nickname = 7; - optional string mobile_phone_number = 8; - bet.beteran.member.MemberState state = 9; + string password = 7; + string nickname = 8; + optional string mobile_phone_number = 9; + bet.beteran.member.MemberState state = 10; } message CreateMemberResponse {