beteran-protobuf/proto/ss/member.proto

155 lines
3.8 KiB
Protocol Buffer
Raw Normal View History

2022-08-13 20:18:21 +00:00
syntax = "proto3";
package bet.beteran.ss.member;
import "protobuf/rpc.proto";
import "protobuf/pagination.proto";
import "models/core/network.proto";
import "models/member.proto";
// subject = bet.beteran.ss.member.CreateMember
message CreateMemberRequest {
message Request {
string site_id = 1;
string member_class_id = 2;
string member_level_id = 3;
optional string referrer_member_username = 4;
string username = 5;
string password = 6;
string nickname = 7;
optional string mobile_phone_number = 8;
bet.beteran.member.MemberState state = 9;
}
bet.beteran.core.network.Client client = 1;
Request request = 2;
}
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 {
message Request {
message Search {
optional string site_id = 1;
optional string member_class_id = 2;
optional string member_level_id = 3;
optional string referrer_member_id = 4;
optional string username_like = 5;
optional string nickname_like = 6;
optional string mobile_phone_number_like = 7;
optional string last_signined_ip = 8;
optional bet.beteran.member.MemberState state = 9;
optional uint64 deleted_at = 10;
}
optional bet.protobuf.pagination.Pagination pagination = 1;
repeated bet.protobuf.pagination.Sort sorts = 2;
optional Search search = 3;
}
bet.beteran.core.network.Client client = 1;
Request request = 2;
}
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 {
message Request {
string id = 1;
}
bet.beteran.core.network.Client client = 1;
Request request = 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 {
message Request {
string username = 1;
}
bet.beteran.core.network.Client client = 1;
Request request = 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 {
message Request {
string id = 1;
optional string site_id = 2;
optional string member_level_id = 3;
optional string password = 4;
optional string mobile_phone_number = 5;
}
bet.beteran.core.network.Client client = 1;
Request request = 2;
}
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.UpdateMemberForState
message UpdateMemberForStateRequest {
message Request {
string id = 1;
bet.beteran.member.MemberState state = 2;
}
bet.beteran.core.network.Client client = 1;
Request request = 2;
}
message UpdateMemberForStateResponse {
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 {
message Request {
string id = 1;
}
bet.beteran.core.network.Client client = 1;
Request request = 2;
}
message DeleteMemberResponse {
message Result {
}
optional bet.protobuf.rpc.Error error = 1;
optional Result result = 2;
}