Files
lone-services/rpc/chore/chore.proto
T
2026-10-19 17:30:45 +08:00

214 lines
4.2 KiB
Protocol Buffer

syntax = "proto3";
package chore;
option go_package = "lone-services/rpc/chore";
import "google/api/annotations.proto";
service Chore {
rpc Policy(PolicyReq) returns (Response) {
option (google.api.http) = {
get: "/api/v3/chore/oss/policy"
body: "*"
};
}
rpc Upload(UploadReq) returns (Response) {
option (google.api.http) = {
post: "/api/v3/chore/oss/upload"
body: "*"
};
}
rpc Test(TestReq) returns (Response) {
option (google.api.http) = {
post: "/api/v3/chore/test"
body: "*"
};
}
rpc DecryptMobile(DecryptMobileReq) returns (Response) {
option (google.api.http) = {
get: "/api/v3/chore/decrypt/mobile"
};
}
rpc Regions(RegionsReq) returns (Response) {
option (google.api.http) = {
get: "/api/v3/chore/regions"
};
}
rpc SendSms(SendSmsReq) returns (Response) {
option (google.api.http) = {
post: "/api/v3/chore/sms/send"
body: "*"
};
}
rpc AnswerItems(EmptyReq) returns (Response) {
option (google.api.http) = {
get: "/admin/v3/chore/answer/items"
};
}
rpc AnswerStatus(StatusReq) returns (Response) {
option (google.api.http) = {
post: "/admin/v3/chore/answer/status"
};
}
rpc AnswerInfo(IdReq) returns (Response) {
option (google.api.http) = {
get: "/admin/v3/chore/answer/info"
};
}
rpc AnswerCreate(EditReq) returns (Response) {
option (google.api.http) = {
post: "/admin/v3/chore/answer/create"
};
}
rpc AnswerEdit(EditReq) returns (Response) {
option (google.api.http) = {
post: "/admin/v3/chore/answer/edit"
};
}
rpc SystemEdit(SystemEditReq) returns (Response) {
option (google.api.http) = {
post: "/admin/v3/chore/system/edit"
};
}
rpc SystemStatus(StatusReq) returns (Response) {
option (google.api.http) = {
post: "/admin/v3/chore/system/status"
};
}
rpc SystemInfo(IdReq) returns (Response) {
option (google.api.http) = {
get: "/admin/v3/chore/system/info"
};
}
rpc SystemItems(EmptyReq) returns (Response) {
option (google.api.http) = {
get: "/admin/v3/chore/system/items"
};
}
rpc Document(DocumentReq) returns (Response) {
option (google.api.http) = {
get: "/api/v3/chore/document"
body: "*"
};
}
rpc InternalUpload(InternalUploadReq) returns (InternalUploadData);
rpc RegionsByIds(RegionsByIdsReq) returns (RegionsByIdsData);
rpc InternalActionApplyLogCreate(InternalActionApplyLogCreateReq) returns (InternalActionApplyLogCreateData);
rpc SendPassword(SendPasswordReq) returns (SendPasswordResp);
}
message Response {
int32 code = 1;
string msg = 2;
string data = 3;
}
message EmptyReq {
}
message IdReq {
int64 id = 1;
}
message StatusReq {
int64 id = 1;
int32 status = 2;
string reason = 3;
}
message EditReq {
int64 id = 1;
string question = 2;
string explain = 3;
string right = 4;
string answers = 5;
}
message SystemEditReq {
int32 type = 1;
string content = 2;
}
message DocumentReq {
int32 type = 1;
}
message PolicyReq {
string key = 1;
}
message UploadReq {
string filename = 1;
bytes content = 2;
}
message InternalUploadReq {
string filename = 1;
bytes content = 2;
}
message InternalUploadData {
string url = 1;
string path = 2;
string host = 3;
}
message TestReq {
int32 id = 1;
repeated int64 ids = 2;
uint32 number = 3;
string char = 4;
}
message DecryptMobileReq {
string origin_mobile = 1;
}
message RegionsReq {
int32 parent_id = 1;
}
message RegionsByIdsReq {
repeated int64 ids = 1;
}
message RegionItem {
int64 id = 1;
string name = 2;
}
message RegionsByIdsData {
repeated RegionItem items = 1;
}
message SendSmsReq {
string mobile = 1;
int32 scene = 2;
}
message InternalActionApplyLogCreateReq {
int64 admin_id = 1;
int64 obj_id = 2;
uint32 type = 3; // 1产品 2门店 3地址 4销售
string reason = 4;
uint32 status = 5; // 1通过 2驳回 9待审核
}
message InternalActionApplyLogCreateData {
int64 id = 1;
}
message SendPasswordReq {
string mobile = 1;
string password = 2;
string browser_info = 3;
string ip = 4;
string browser_name = 5;
}
message SendPasswordResp {
int32 code = 1;
}