javascript/proto/order/purch.proto

59 lines
1.3 KiB
Protocol Buffer

syntax = "proto3";
package order;
option go_package = "./order";
message Empty{
}
message FetchRequest {
int64 page_no=1; // 页数
int64 page_size=2; // 每页记录数
map<string,string> params=3; // 条件参数,key=val,eg key:category_id=?,vlaue=11
}
message IdentRequest{
int64 id = 1; // 唯一ID
string identity = 2; // 唯一码
}
message StatusReply{
int64 status = 1; // 状态码
string identity=2; // 标识码
string message=3; //状态说明
int64 timeseq=4; // 响应时间序列
}
// Order(订单)微服务-采购计划微服务
service Purch {
// 创建采购计划
rpc CreatePlan(PlanItem) returns (StatusReply) {};
// 修改采购计划
rpc ModifyPlan(PlanItem) returns (StatusReply) {};
// 采购计划列表
rpc FetchPlan(FetchRequest) returns (FetchReply) {};
// 作废采购计划
rpc CancelPlan(CancelPlanRequest) returns (StatusReply) {};
}
message PlanItem{
int64 id = 1; // ID
int64 identity = 2; // 计划唯一标识
string title = 3; //计划名称
string descr = 4; //计划描述
string passport_identity =5; // 用户唯一码
}
message FetchReply {
repeated PlanItem data = 1; // 采购计划列表
}
message CancelPlanRequest {
repeated int64 id = 3;
}