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: "*" }; } rpc ItemsAgents(EmptyReq) returns (Response) { option (google.api.http) = { get: "/admin/v3/wecom/agent" body: "*" }; } rpc Types(EmptyReq) returns (Response) { option (google.api.http) = { get: "/admin/v3/wecom/types" body: "*" }; } } message Response { int32 code = 1; string msg = 2; string data = 3; } message EmptyReq {} message ItemsUserReq { uint32 page = 1; uint32 page_size = 2; string name = 3; uint32 type = 4; uint32 status = 5; } message CreateUserReq { int64 user_id = 1; uint32 type = 2; string name = 3; string mobile = 4; string avatar = 5; uint32 status = 6; repeated int64 agent_ids = 7; // 应用 agents.id,多选 } 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; repeated int64 agent_ids = 8; // 应用 agents.id,多选 } message StatusUserReq { int64 id = 1; uint32 status = 2; // 1: 启用,2: 禁用 } message DeleteUserReq { int64 id = 1; }