Files
full/module/ec/mall/proto/freight.proto

85 lines
2.7 KiB
Protocol Buffer
Raw Permalink 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 mall;
option go_package = "bsm/full/module/ec/mall/pb;mall";
import "module/ec/mall/proto/const.proto";
// 运费设置相关
service Freight{
// 运费模板列表
rpc Fetch(blocks.MallFetchRequest) returns(FreightReply) {};
// 运费模板修改
rpc Modify(FreightItem) returns(blocks.IdentityStatusReply) {};
// 运费模板删除
rpc Delete(blocks.IdentRequest) returns(blocks.IdentityStatusReply) {};
// 运费模板创建
rpc Create(FreightItem) returns(blocks.IdentityStatusReply) {};
// 运费模板详情
rpc Detail(blocks.IdentRequest) returns(FreightItem) {};
// 限制区域列表
rpc DenyRegionFetch (blocks.MallFetchRequest) returns(DenyRegionReply) {};
// 新建限制区域
rpc DenyRegionCreate (DenyRegionItem) returns(blocks.IdentityStatusReply) {};
// 移除限制区域
rpc DenyRegionDelete (blocks.IdentRequest) returns(blocks.IdentityStatusReply) {};
// 编辑限制区域
rpc DenyRegionModify (DenyRegionItem) returns(blocks.IdentityStatusReply) {};
}
message DenyRegionItem{
int64 id = 1;
string identity = 2;
string mall_identity = 3 [json_name="mall_identity"];
string title = 4; // 名称
repeated RegionItem region = 5; // 限售区域
}
message FreightItem{
int64 id = 1; //属性ID
string identity = 2; //唯一标识
int32 status = 3; // 状态1正常-1禁用
string title = 4; // 名称
int32 post_type = 5 [json_name="post_type"]; // 是否包邮1包邮2不包邮
int64 quota = 6; // 当types=1时满额包邮
int32 cost_type = 7 [json_name="cost_type"]; // 计费类型1计件收费2按重收费,3按体积收费
int32 region_type = 8 [json_name="region_type"]; // 区域限售:1限制2不限制
repeated FreightAttrItem rules = 9; // 计费规则
}
message RegionItem{
int32 id =1;
string name = 2;
repeated RegionItem second = 3;
}
message FreightAttrItem{
int64 id = 1;
string identity = 2; //
string freight_identity = 3 [json_name="freight_identity"]; // 模板唯一标识
string region_str = 4 [json_name="region_str"]; // 地区名称
repeated RegionItem region = 5; // 地区
int64 price_basic = 6 [json_name="price_basic"]; // 起步运费
int64 count_basic = 7 [json_name="count_basic"]; // 起步数量
int64 count_extra = 8 [json_name="count_extra"]; // 加价数量
int64 price_extra = 9 [json_name="price_extra"]; // 加价单价
int32 status = 10; // 状态1正常-1禁用
int32 is_default = 11 [json_name="is_default"]; // 是否是默认1-不是2是
}
message FreightReply{
int64 count = 1;
repeated FreightItem data = 2;
}
message DenyRegionReply{
int64 count = 1;
repeated DenyRegionItem data = 2;
}