41 lines
1.1 KiB
Protocol Buffer
41 lines
1.1 KiB
Protocol Buffer
syntax = "proto3";
|
||
package delivery;
|
||
option go_package = "./delivery";
|
||
import "blocks.proto";
|
||
|
||
// Delivery(配送)微服务
|
||
service Car {
|
||
// 配送车辆列表
|
||
rpc CarList(FetchRequest) returns (CarListReply) {};
|
||
|
||
// 添加配送车辆信息
|
||
rpc CarAdd(CarItem) returns (StatusReply) {};
|
||
|
||
// 获取配送车辆信息
|
||
rpc CarGet(IdentRequest)returns (CarItem) {};
|
||
|
||
// 修改配送车辆信息
|
||
rpc CarSet(CarItem) returns (StatusReply) {};
|
||
|
||
// 删除配送车辆信息
|
||
rpc CarDel(IdentRequest) returns (StatusReply) {};
|
||
|
||
}
|
||
message CarListReply{
|
||
int64 count = 1;
|
||
repeated CarItem list = 2;
|
||
}
|
||
|
||
|
||
|
||
message CarItem{
|
||
string identity = 1; // 唯一标识
|
||
string brand = 2; // 品牌
|
||
string version = 3; // 型号
|
||
string license_number = 4; // 车牌号
|
||
string team_identity = 5; // 团队唯一标识
|
||
string contacts = 6; // 联系人姓名
|
||
string phone = 7; // 联系人电话
|
||
int64 status = 8; // 状态:1正常;-1禁用
|
||
string picture = 9; // 车辆图片
|
||
} |