refactor: reorganize modules and add Linux build tooling

This commit is contained in:
2026-08-09 12:41:08 +08:00
parent 86024fa81d
commit 5cc5fd92ed
1461 changed files with 4054 additions and 4724 deletions

View 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;
}