member_class, member_level are added

This commit is contained in:
병준 박 2022-08-12 08:07:43 +00:00
parent 2dcdf56318
commit dd38aff481
7 changed files with 178 additions and 10 deletions

View File

@ -56,6 +56,8 @@ static TARGETS: Lazy<HashMap<&str, Vec<&str>>> = Lazy::new(|| {
"./proto/c2se/backend/site.proto", "./proto/c2se/backend/site.proto",
"./proto/c2se/backend/account.proto", "./proto/c2se/backend/account.proto",
"./proto/c2se/backend/identity.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/backend/member.proto",
"./proto/c2se/frontend/account.proto", "./proto/c2se/frontend/account.proto",
"./proto/c2se/frontend/identity.proto", "./proto/c2se/frontend/identity.proto",

View File

@ -15,11 +15,12 @@ message CreateMemberRequest {
string site_id = 1; string site_id = 1;
string member_class_id = 2; string member_class_id = 2;
string member_level_id = 3; string member_level_id = 3;
optional string referrer_member_id = 4; optional string referrer_member_username = 4;
string username = 5; string username = 5;
string nickname = 6; string password = 6;
optional string mobile_phone_number = 7; string nickname = 7;
bet.beteran.member.MemberState state = 8; optional string mobile_phone_number = 8;
bet.beteran.member.MemberState state = 9;
} }
message CreateMemberResponse { message CreateMemberResponse {

View File

@ -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;
}

View File

@ -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;
}

View File

@ -8,5 +8,4 @@ message MemberClass {
string name = 3; string name = 3;
uint64 created_at = 4; uint64 created_at = 4;
uint64 updated_at = 5; uint64 updated_at = 5;
optional uint64 deleted_at = 6;
} }

View File

@ -8,5 +8,4 @@ message MemberLevel {
uint32 sort_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;
} }

View File

@ -16,11 +16,12 @@ message CreateMemberRequest {
string site_id = 2; string site_id = 2;
string member_class_id = 3; string member_class_id = 3;
string member_level_id = 4; string member_level_id = 4;
optional string referrer_member_id = 5; optional string referrer_member_username = 5;
string username = 6; string username = 6;
string nickname = 7; string password = 7;
optional string mobile_phone_number = 8; string nickname = 8;
bet.beteran.member.MemberState state = 9; optional string mobile_phone_number = 9;
bet.beteran.member.MemberState state = 10;
} }
message CreateMemberResponse { message CreateMemberResponse {