beteran-protobuf/proto/ss/member/member.proto
2022-08-12 06:42:07 +00:00

120 lines
3.1 KiB
Protocol Buffer

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.CreateMember
message CreateMemberRequest {
bet.beteran.core.network.Client client = 1;
string site_id = 2;
string member_class_id = 3;
string member_level_id = 4;
optional string referrer_member_id = 5;
string username = 6;
string nickname = 7;
optional string mobile_phone_number = 8;
bet.beteran.member.MemberState state = 9;
}
message CreateMemberResponse {
message Result {
bet.beteran.member.MemberModel member = 1;
}
optional bet.protobuf.rpc.Error error = 1;
optional Result result = 2;
}
// 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;
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 Result {
repeated bet.beteran.member.MemberModel 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.MemberModel 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.MemberModel member = 1;
}
optional bet.protobuf.rpc.Error error = 1;
optional Result result = 2;
}
// subject = bet.beteran.ss.member.UpdateMember
message UpdateMemberRequest {
bet.beteran.core.network.Client client = 1;
string id = 2;
optional string site_id = 3;
optional string member_level_id = 4;
optional string password = 5;
optional string mobile_phone_number = 6;
optional bet.beteran.member.MemberState state = 7;
}
message UpdateMemberResponse {
message Result {
bet.beteran.member.MemberModel member = 1;
}
optional bet.protobuf.rpc.Error error = 1;
optional Result result = 2;
}
// subject = bet.beteran.ss.member.DeleteMember
message DeleteMemberRequest {
bet.beteran.core.network.Client client = 1;
string id = 2;
}
message DeleteMemberResponse {
message Result {
}
optional bet.protobuf.rpc.Error error = 1;
optional Result result = 2;
}