refactor: reorganize modules and add Linux build tooling
This commit is contained in:
85
module/ec/mall/proto/freight.proto
Normal file
85
module/ec/mall/proto/freight.proto
Normal file
@@ -0,0 +1,85 @@
|
||||
syntax = "proto3";
|
||||
package mall;
|
||||
option go_package = ".;mall";
|
||||
import "blocks.proto";
|
||||
|
||||
// 运费设置相关
|
||||
service Freight{
|
||||
// 运费模板列表
|
||||
rpc Fetch(FetchRequest) returns(FreightReply) {};
|
||||
|
||||
// 运费模板修改
|
||||
rpc Modify(FreightItem) returns(StatusReply) {};
|
||||
|
||||
// 运费模板删除
|
||||
rpc Delete(IdentRequest) returns(StatusReply) {};
|
||||
|
||||
// 运费模板创建
|
||||
rpc Create(FreightItem) returns(StatusReply) {};
|
||||
|
||||
// 运费模板详情
|
||||
rpc Detail(IdentRequest) returns(FreightItem) {};
|
||||
|
||||
// 限制区域列表
|
||||
rpc DenyRegionFetch (FetchRequest) returns(DenyRegionReply) {};
|
||||
|
||||
// 新建限制区域
|
||||
rpc DenyRegionCreate (DenyRegionItem) returns(StatusReply) {};
|
||||
|
||||
// 移除限制区域
|
||||
rpc DenyRegionDelete (IdentRequest) returns(StatusReply) {};
|
||||
|
||||
// 编辑限制区域
|
||||
rpc DenyRegionModify (DenyRegionItem) returns(StatusReply) {};
|
||||
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user