81 lines
1.6 KiB
Protocol Buffer
81 lines
1.6 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package wecom;
|
|
option go_package = "lone-services/rpc/wecom";
|
|
import "google/api/annotations.proto";
|
|
|
|
service Wecom {
|
|
rpc ItemsUsers(ItemsUserReq) returns (Response) {
|
|
option (google.api.http) = {
|
|
get: "/admin/v3/wecom/user"
|
|
body: "*"
|
|
};
|
|
}
|
|
rpc CreateUser(CreateUserReq) returns (Response) {
|
|
option (google.api.http) = {
|
|
post: "/admin/v3/wecom/user"
|
|
body: "*"
|
|
};
|
|
}
|
|
rpc UpdateUser(UpdateUserReq) returns (Response) {
|
|
option (google.api.http) = {
|
|
put: "/admin/v3/wecom/user"
|
|
body: "*"
|
|
};
|
|
}
|
|
rpc StatusUser(StatusUserReq) returns (Response) {
|
|
option (google.api.http) = {
|
|
put: "/admin/v3/wecom/user/status"
|
|
body: "*"
|
|
};
|
|
}
|
|
rpc DeleteUser(DeleteUserReq) returns (Response) {
|
|
option (google.api.http) = {
|
|
put: "/admin/v3/wecom/user/delete"
|
|
body: "*"
|
|
};
|
|
}
|
|
}
|
|
|
|
message Response {
|
|
int32 code = 1;
|
|
string msg = 2;
|
|
string data = 3;
|
|
}
|
|
|
|
message ItemsUserReq {
|
|
uint32 page = 1;
|
|
uint32 page_size = 2;
|
|
string name = 3;
|
|
uint32 type = 4; // 1: 管理员,2: 销售
|
|
uint32 status = 5; // 1: 启用,2: 禁用
|
|
}
|
|
|
|
message CreateUserReq {
|
|
int64 user_id = 1;
|
|
uint32 type = 2;
|
|
string name = 3;
|
|
string mobile = 4;
|
|
string avatar = 5;
|
|
uint32 status = 6;
|
|
}
|
|
|
|
message UpdateUserReq {
|
|
int64 id = 1; // wecom_users 主键,优先
|
|
int64 user_id = 2;
|
|
uint32 type = 3;
|
|
string name = 4;
|
|
string mobile = 5;
|
|
string avatar = 6;
|
|
uint32 status = 7;
|
|
}
|
|
|
|
message StatusUserReq {
|
|
int64 id = 1;
|
|
uint32 status = 2; // 1: 启用,2: 禁用
|
|
}
|
|
|
|
message DeleteUserReq {
|
|
int64 id = 1;
|
|
}
|