Files
lone-services/rpc/task/task.proto
T
2026-08-31 18:15:26 +08:00

75 lines
1.3 KiB
Protocol Buffer

syntax = "proto3";
package task;
option go_package="./task";
import "google/api/annotations.proto";
message Response {
int32 code = 1;
string msg = 2;
string data = 3;
}
message EmtpyRequest {
}
message CreateRequest {
int32 type =1;
int32 time =2;
int64 province =3;
string province_name =4;
int32 task =5;
double award =6;
int64 product_id =7;
}
message EditRequest {
int64 id = 1;
int32 task =2;
double award =3;
}
message IdRequest {
int64 id = 1;
}
message StatusRequest {
int64 id = 1;
int32 status = 2;
string reason = 3;
}
service Task {
rpc Items(EmtpyRequest) returns(Response){
option (google.api.http) = {
get: "/admin/v3/task/items"
body: "*"
};
};
rpc Info(IdRequest) returns(Response){
option (google.api.http) = {
get: "/admin/v3/task/info"
body: "*"
};
};
rpc Create(CreateRequest) returns(Response){
option (google.api.http) = {
post: "/admin/v3/task/create"
body: "*"
};
};
rpc Edit(EditRequest) returns(Response){
option (google.api.http) = {
post: "/admin/v3/task/edit"
body: "*"
};
};
rpc Status(StatusRequest) returns(Response){
option (google.api.http) = {
post: "/admin/v3/task/status"
body: "*"
};
};
}