Files
full/module/ec/address/proto/address.proto

76 lines
1.9 KiB
Protocol Buffer
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
syntax = "proto3";
package address;
option go_package = "bsm/full/module/ec/address/pb;address";
// 地址库
service Library {
// 新增地址
rpc Create(AddressCreateRequest) returns (StatusReply) {};
// 修改地址
rpc Modify(AddressItem) returns (StatusReply) {};
// 获取一条地址
rpc Get(IdentRequest) returns (AddressItem) {};
// 获取地址列表
rpc Fetch(IdentRequest) returns (AddressListReply) {};
// 删除一个地址
rpc Delete(AddressDeleteRequest) returns (StatusReply) {};
}
message AddressItem {
int64 id = 1; // ID
string identity=2;
string phone = 3; // 手机号
string country = 4; // 国家
string province = 5; // 省
string city = 6; // 市
string area = 7; // 区
string detail = 8; // 详情地址
string contact = 9; // 联系人
string name=10;
string pics=11;
int32 status = 12; // 状态 -1为删除1为正常2为设置成默认
}
message AddressCreateRequest {
string phone = 1; // 手机号
string country = 2; // 国家
string province = 3; // 省
string city = 4; // 市
string area = 5; // 区
string detail = 6; // 详情地址
string contact = 7; // 联系人
string name=8;// 名称
string pics=9;// 图片
int32 status = 10; // 状态 -1为删除1为正常2为设置成默认
}
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{
int32 code = 1; // 状态码
string identity=2; // 标识码
string message=3; //状态说明
int64 timeseq=4; // 响应时间序列
}
message AddressListReply {
repeated AddressItem data = 1; // 地址列表
}
message AddressDeleteRequest {
repeated int64 id = 1; // ID
}