feat: import services and standardize Go 1.26.5
This commit is contained in:
43
apps/ec/mall/proto/ads.proto
Normal file
43
apps/ec/mall/proto/ads.proto
Normal file
@@ -0,0 +1,43 @@
|
||||
syntax = "proto3";
|
||||
package mall;
|
||||
option go_package = ".;mall";
|
||||
import "blocks.proto";
|
||||
|
||||
//Store(店铺)微服务 - 广告
|
||||
service Ads{
|
||||
//通过广告位获取广告信息
|
||||
rpc ByPos(ByPosRequest) returns (AdsListReply) {}
|
||||
|
||||
// 广告列表
|
||||
rpc Fetch(FetchRequest) returns (AdsListReply){};
|
||||
|
||||
// 新建广告
|
||||
rpc Create (AdsItem) returns (StatusReply){};
|
||||
|
||||
// 修改广告
|
||||
rpc Modify (AdsItem) returns (StatusReply){};
|
||||
|
||||
// 删除广告
|
||||
rpc Delete (IdentRequest) returns (StatusReply){};
|
||||
}
|
||||
message ByPosRequest{
|
||||
repeated string pos_key = 1 [json_name="pos_key"];
|
||||
string store_identity = 2 [json_name="store_identity"]; // 店铺唯一标识
|
||||
}
|
||||
|
||||
// 公告列表
|
||||
message AdsListReply{
|
||||
repeated AdsItem data = 1;
|
||||
int64 count = 2;
|
||||
}
|
||||
|
||||
message AdsItem{
|
||||
int64 id = 1;
|
||||
string pos_key=2 [json_name="pos_key"]; // 广告位置
|
||||
string title = 3;// 广告名称
|
||||
string content = 4;// 广告内容
|
||||
int32 type = 5;// 广告类型 1.文本 2.图片 3.视频
|
||||
string to_url = 6 [json_name="to_url"];// 跳转链接
|
||||
string created_at = 7 [json_name="created_at"];// 创建时间
|
||||
int64 status = 8;// 状态:默认为0,-1禁止,1为正常
|
||||
}
|
||||
46
apps/ec/mall/proto/blocks.proto
Normal file
46
apps/ec/mall/proto/blocks.proto
Normal file
@@ -0,0 +1,46 @@
|
||||
syntax = "proto3";
|
||||
package mall;
|
||||
option go_package = ".;mall";
|
||||
|
||||
message Empty{
|
||||
}
|
||||
|
||||
message FetchRequest {
|
||||
int64 page_no=1 [json_name = "page_no"]; // 页数
|
||||
int64 page_size=2 [json_name = "page_size"]; // 每页记录数
|
||||
map<string,string> params=3; // 条件参数,key=val,eg key:categoryId=?,vlaue=11
|
||||
string store_identity = 4 [json_name="store_identity"]; // 店铺唯一标识
|
||||
string keyword = 5; // 关键词
|
||||
repeated int64 category_id = 6;// 分类ID
|
||||
string sort = 7;// 排序字段
|
||||
int64 min_price = 8 [json_name="min_price"];// 最小价格
|
||||
int64 max_price = 9 [json_name="max_price"];// 最大价格
|
||||
}
|
||||
|
||||
message IdentRequest{
|
||||
int64 id = 1; // 唯一ID
|
||||
string identity = 2; // 唯一码
|
||||
}
|
||||
|
||||
message StoreSerialRequest{
|
||||
string store_identity = 1 [json_name="store_identity"]; // 店铺Identity
|
||||
repeated string serial_id = 2 [json_name="serial_id"]; // 序列Identity
|
||||
}
|
||||
|
||||
message StatusReply{
|
||||
int32 code = 1; // 状态码
|
||||
string identity=2; // 标识码
|
||||
string message=3; //状态说明
|
||||
int64 timeseq=4; // 响应时间序列
|
||||
}
|
||||
|
||||
|
||||
message VersionRequest {
|
||||
int64 version = 1; // 时序版本号
|
||||
}
|
||||
|
||||
|
||||
message SearchRequest {
|
||||
string keyword = 1; //关键词
|
||||
}
|
||||
|
||||
48
apps/ec/mall/proto/category.proto
Normal file
48
apps/ec/mall/proto/category.proto
Normal file
@@ -0,0 +1,48 @@
|
||||
syntax = "proto3";
|
||||
package mall;
|
||||
option go_package = ".;mall";
|
||||
import "blocks.proto";
|
||||
|
||||
// Store(店铺)微服务-分类
|
||||
service Category{
|
||||
// 获取分类数据
|
||||
rpc Fetch(CategoryFetchRequest) returns(CategoryReply) {};
|
||||
|
||||
// 添加分类
|
||||
rpc Create(CategoryItem) returns(StatusReply) {};
|
||||
|
||||
// 删除分类
|
||||
rpc Delete(IdentRequest) returns(StatusReply) {};
|
||||
|
||||
// 修改分类
|
||||
rpc Modify(CategoryItem) returns(StatusReply) {};
|
||||
|
||||
}
|
||||
|
||||
message CategoryFetchRequest{
|
||||
string types = 1; // 需要的分类类型:all-所有分类(默认),first-一级分类
|
||||
string keywords = 2; // 关键字
|
||||
int64 id = 3; // 需要被查询的id
|
||||
string store_identity = 4 [json_name="store_identity"]; // 店铺唯一标识
|
||||
}
|
||||
|
||||
message CategoryReply{
|
||||
int64 count = 1; // 数量
|
||||
repeated CategoryItem data = 2;
|
||||
}
|
||||
|
||||
message CategoryItem{
|
||||
int64 id = 1; //ID
|
||||
string identity = 2;
|
||||
string title = 3; //名称
|
||||
string en_title = 4 [json_name="en_title"]; //英文名称
|
||||
int64 parent_id = 5 [json_name="parent_id"]; //上级ID
|
||||
string paths = 6; //路径
|
||||
string intro = 7; //简介
|
||||
string icon = 8; //图标
|
||||
int32 sort = 9; //排序
|
||||
int32 status = 10; // 状态:1-正常,2停用
|
||||
string created_at = 11 [json_name="created_at"]; // 创建时间
|
||||
repeated CategoryItem categories = 12; // 子集
|
||||
string keys = 13; //关键词
|
||||
}
|
||||
85
apps/ec/mall/proto/freight.proto
Normal file
85
apps/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;
|
||||
}
|
||||
39
apps/ec/mall/proto/notice.proto
Normal file
39
apps/ec/mall/proto/notice.proto
Normal file
@@ -0,0 +1,39 @@
|
||||
syntax = "proto3";
|
||||
package mall;
|
||||
option go_package =".;mall";
|
||||
import "blocks.proto";
|
||||
|
||||
// Store(店铺)微服务-公告
|
||||
service Notice{
|
||||
// 公告列表
|
||||
rpc Fetch(FetchRequest) returns (NoticeListReply){};
|
||||
|
||||
// 新建公告
|
||||
rpc Create (NoticeItem) returns (StatusReply){};
|
||||
|
||||
// 修改公告
|
||||
rpc Modify (NoticeItem) returns (StatusReply){};
|
||||
|
||||
// 删除公告
|
||||
rpc Delete (IdentRequest) returns (StatusReply){};
|
||||
}
|
||||
|
||||
// 公告列表
|
||||
message NoticeListReply{
|
||||
repeated NoticeItem data = 1;
|
||||
int64 count = 2;
|
||||
}
|
||||
|
||||
// 公告
|
||||
message NoticeItem{
|
||||
string identity = 1; // 唯一标识
|
||||
string title = 2; // 标题
|
||||
string content = 3; // 内容
|
||||
string author = 4; // 作者
|
||||
int64 store_id=5 [json_name="store_id"]; // 店铺ID
|
||||
string store_identity = 6 [json_name="store_identity"]; // 店铺唯一标识
|
||||
string created_at = 7 [json_name="created_at"];
|
||||
int64 status = 8;// 状态:默认为0,-1禁止,1为正常
|
||||
}
|
||||
|
||||
|
||||
302
apps/ec/mall/proto/product.proto
Normal file
302
apps/ec/mall/proto/product.proto
Normal file
@@ -0,0 +1,302 @@
|
||||
syntax = "proto3";
|
||||
package mall;
|
||||
option go_package = ".;mall";
|
||||
import "blocks.proto";
|
||||
|
||||
// 产品相关
|
||||
service Product{
|
||||
// 获取产品列表
|
||||
rpc ItemFetch(FetchRequest) returns(ListReply) {};
|
||||
|
||||
// 获取产品详情
|
||||
rpc ItemDetail(IdentRequest) returns(ProductItem) {};
|
||||
|
||||
// 通过产品序列获取产品详情
|
||||
rpc ItemDetailBySerial(StoreSerialRequest) returns(ListReply) {};
|
||||
|
||||
// 通过规格编号获取产品详情
|
||||
rpc ItemDetailBySpec(DetailBySpecRequest) returns(ListItem) {};
|
||||
|
||||
// 添加产品
|
||||
rpc ItemCreate(ProductItem) returns(StatusReply) {};
|
||||
|
||||
// 删除产品
|
||||
rpc ItemDelete(IdentRequest) returns(StatusReply) {};
|
||||
|
||||
// 发布/取消发布 产品
|
||||
rpc ItemModify(ModifyRequest) returns(StatusReply) {};
|
||||
|
||||
// 批量操作
|
||||
rpc ItemBatchOp(OpRequest) returns(StatusReply) {};
|
||||
|
||||
// 产品规格列表
|
||||
rpc SpecFetch(FetchRequest) returns(SpecReply) {};
|
||||
|
||||
// 添加产品规格
|
||||
rpc SpecCreate(SpecItem) returns(StatusReply) {};
|
||||
|
||||
// 修改产品规格
|
||||
rpc SpecModify(SpecItem) returns(StatusReply) {};
|
||||
|
||||
// 删除产品规格
|
||||
rpc SpecDelete(IdentRequest) returns(StatusReply) {};
|
||||
|
||||
// 产品详情
|
||||
rpc SpecDetail(IdentRequest) returns(SpecItem) {};
|
||||
|
||||
// 添加产品图片
|
||||
rpc PhotoCreate(PhotoItem) returns(StatusReply){};
|
||||
|
||||
// 删除产品图片
|
||||
rpc PhotoDelete(IdentRequest) returns(StatusReply){};
|
||||
|
||||
// 产品图片列表
|
||||
rpc PhotoList(PhotoItem) returns(PhotoReply){};
|
||||
|
||||
// 产品的评论列表
|
||||
rpc CommentFetch(FetchRequest) returns (CommentListReply) {};
|
||||
|
||||
// 评论
|
||||
rpc CommentCreate(CommentItem) returns(StatusReply) {};
|
||||
|
||||
// 回复评论
|
||||
rpc CommentRe(CommentItem) returns(StatusReply) {};
|
||||
|
||||
// 删除评论
|
||||
rpc CommentDelete(IdentRequest) returns(StatusReply) {};
|
||||
|
||||
// 修改评论
|
||||
rpc CommentModify(CommentItem) returns(StatusReply) {};
|
||||
}
|
||||
|
||||
|
||||
// 商品属性
|
||||
message AttrItem{
|
||||
int64 id = 1; //属性ID
|
||||
string name = 2; //属性名称
|
||||
int32 parent_id =3 [json_name="parent_id"]; //上级ID
|
||||
string value = 4; //属性值
|
||||
}
|
||||
|
||||
// 商品评论
|
||||
message CommentItem{
|
||||
int64 id = 1; //ID
|
||||
string identity = 2; // 评论唯一标识
|
||||
string created_at = 3 [json_name="created_at"]; //创建时间
|
||||
string nick_name = 4 [json_name="nick_name"]; //用户名称
|
||||
int32 score = 5; //评分
|
||||
string comment = 6; //评论正文
|
||||
string reply = 7; //回复正文
|
||||
string product_identity =8 [json_name="product_identity"]; // 所属商品唯一标识
|
||||
string store_identity = 9 [json_name="store_identity"];// 店铺唯一标识
|
||||
string spec_identity = 10 [json_name="spec_identity"];// 产品规格唯一标识
|
||||
string comment_identity = 11 [json_name="comment_identity"]; // 被回复的评论唯一标识
|
||||
string product = 12;// 所属商品
|
||||
string product_spec = 13 [json_name="product_spec"];// 产品规格
|
||||
bool is_comment = 14 [json_name="is_comment"]; // 是否是评论
|
||||
}
|
||||
message CommentItemRep{
|
||||
int64 id = 1; //ID
|
||||
string identity = 2; // 评论唯一标识
|
||||
string created_at = 3 [json_name="created_at"]; //创建时间
|
||||
string nick_name = 4 [json_name="nick_name"]; //用户名称
|
||||
int32 score = 5; //评分
|
||||
string comment = 6; //评论正文
|
||||
string reply = 7; //回复正文
|
||||
string product_identity =8 [json_name="product_identity"]; // 所属商品唯一标识
|
||||
string store_identity = 9 [json_name="store_identity"];// 店铺唯一标识
|
||||
string spec_identity = 10 [json_name="spec_identity"];// 产品规格唯一标识
|
||||
string comment_identity = 11 [json_name="comment_identity"]; // 被回复的评论唯一标识
|
||||
repeated CommentItem list = 12; // 评论列表
|
||||
string product = 13;// 所属商品
|
||||
string product_spec = 14 [json_name="product_spec"];// 产品规格
|
||||
}
|
||||
|
||||
|
||||
message DetailBySpecRequest{
|
||||
string spec_no = 1 [json_name="spec_no"]; // 产品规格编号
|
||||
}
|
||||
message OpRequest{
|
||||
repeated string identity = 1; // 需要被禁用的产品唯一标识
|
||||
int32 status =2; // 更新的数据
|
||||
}
|
||||
message ModifyRequest{
|
||||
string identity = 1; // 产品唯一标识
|
||||
int32 status = 2; // 商品状态:1-已上架,2-自动上架等待中(禁止web手动传入),3-禁用 ,4-草稿,5-未上架
|
||||
}
|
||||
|
||||
message ListItem{
|
||||
int64 product_id = 2 [json_name="product_id"]; // 产品id
|
||||
string product = 3; // 产品名称
|
||||
int64 spec_id = 4 [json_name="spec_id"]; // 规格id
|
||||
string spec = 5; // 规格名称
|
||||
string spec_no = 6 [json_name="spec_no"]; // 规格编号
|
||||
int64 price = 7; // 单价,单位分
|
||||
int64 count = 8; // 数量
|
||||
string img = 9; // 产品图片
|
||||
string product_identity = 10 [json_name="product_identity"]; // 产品唯一标识
|
||||
string serial_id = 11 [json_name="serial_id"]; // 产品序号
|
||||
}
|
||||
message ListWithIdRequest{
|
||||
repeated int64 id = 1; // specId列表
|
||||
}
|
||||
message ListWithIdReply{
|
||||
repeated ListItem data =1;
|
||||
}
|
||||
|
||||
//---- Reply 部分
|
||||
message PhotoReply{
|
||||
int64 count = 1;
|
||||
repeated PhotoItem data = 2;//
|
||||
}
|
||||
|
||||
message SpecReply{
|
||||
int64 count =1;
|
||||
repeated SpecItem data = 2;
|
||||
|
||||
}
|
||||
|
||||
|
||||
message CommentListReply {
|
||||
int64 count = 1; // 数量
|
||||
repeated CommentItemRep data = 2;//评论列表
|
||||
}
|
||||
|
||||
message StatisticReply{
|
||||
int64 total = 1; // 当前产品总数
|
||||
int64 selling = 2; // 在售数量
|
||||
int64 forbidden = 3; // 禁用数量
|
||||
int64 draft = 4; // 草稿数量
|
||||
}
|
||||
|
||||
|
||||
message OrgBySpecIdReply{
|
||||
int64 id = 1; // 机构id
|
||||
string identity = 2; // 店铺唯一标识
|
||||
string title = 3; // 机构名称
|
||||
}
|
||||
|
||||
|
||||
// 备用的产品附加信息
|
||||
message Subjoin{
|
||||
string category_paths = 1 [json_name="category_paths"]; //分类路径
|
||||
string sub_title = 2 [json_name="sub_title"]; //商品标题
|
||||
string keyword = 3; //商品关键字
|
||||
int32 stock = 4; //库存
|
||||
int64 sales_price = 5 [json_name="sales_price"]; //销售价
|
||||
string args = 6; //商品相关参数JSON
|
||||
int32 comment_total = 7 [json_name="comment_total"]; //评论总数
|
||||
int32 sale_total = 8 [json_name="sale_total"]; //销售总数
|
||||
int32 view_total = 9 [json_name="view_total"]; //查看总数
|
||||
int32 image_total = 10 [json_name="image_total"]; //图片总数
|
||||
int32 recommend = 11; //推荐码:0不推荐,1推荐的状态
|
||||
int32 sort = 12; //排序
|
||||
int32 types = 13; //商品类型:Product=1 实体商品,Service=2 服务,Membership=3 会员服务,Other=4 其它
|
||||
int64 star = 14; //商品星级
|
||||
}
|
||||
|
||||
|
||||
message ListReply{
|
||||
int64 count = 1; // 数量
|
||||
repeated ProductItem data = 2; // 产品列表
|
||||
}
|
||||
message ProductBase{
|
||||
int64 id = 1; //商品ID
|
||||
string identity = 2; //商品唯一码
|
||||
int64 supply_id = 4 [json_name="supply_id"]; //供应商ID
|
||||
int64 category_id = 6 [json_name="category_id"]; //分类ID
|
||||
string title = 8; //商品标题
|
||||
string measuring_name = 99 [json_name="measuring_name"]; // 测量单位名称
|
||||
int64 sell_max = 97 [json_name="sell_max"]; // 最大限购数量
|
||||
int64 sell_min = 96 [json_name="sell_min"]; // 最小限购数量
|
||||
int64 wastage = 95; // 损耗率
|
||||
string standard_number = 94 [json_name="standard_number"]; // 产品标准号
|
||||
string brand = 93; // 品牌名称
|
||||
int64 stock_type = 92 [json_name="stock_type"]; // 库存计数方式:1-买方下单减库存,2-完成签约减库存
|
||||
int32 status = 91; // 商品状态:0-未上架,1-已上架,2-自动上架等待中,3-禁用 ,4-草稿
|
||||
string putaway_time = 90 [json_name="putaway_time"]; // 预定的上架时间 YYYY-MM-DD HH:mm:ss
|
||||
string cover_image = 11 [json_name="cover_image"]; //商品封面图片
|
||||
repeated string images = 24; // 产品图片
|
||||
string content = 14; //商品详情
|
||||
string serial_id = 15 [json_name="serial_id"]; // 产品序号
|
||||
}
|
||||
message SpecItem{
|
||||
int64 id = 1; //
|
||||
string identity = 2; // 唯一标识
|
||||
int64 supply_id = 3 [json_name="supply_id"]; //供应商ID
|
||||
string product_identity = 4 [json_name="product_identity"]; // 产品唯一标识
|
||||
string store_identity = 5 [json_name="store_identity"];// 店铺唯一标识
|
||||
string title = 6; // 名称
|
||||
int32 stock_type = 7 [json_name="stock_type"]; // 库存设置:1-设置库存限制,2-不设置库存限制
|
||||
int64 stock = 8; // 库存数量
|
||||
int64 price = 9 ; // 价格,单位:分
|
||||
int64 direct_sales = 10 [json_name="direct_sales"]; // 直营价格,单位:分
|
||||
int32 tp_type = 11 [json_name="tp_type"]; // 阶梯价设置:1-启用,2-不启用
|
||||
int32 ds_tp_type = 12 [json_name="ds_tp_type"];// 直营阶梯价设置:1-启用,2-不启用
|
||||
string img = 13; // 预览图
|
||||
string spec_no = 14 [json_name="spec_no"];// 规格编号
|
||||
string keyword = 15 ;// 关键字
|
||||
int64 purchasing_price = 16 [json_name="purchasing_price"]; // 进口价格,单位:分
|
||||
int64 wholesale = 17;// 代理价,单位:分
|
||||
}
|
||||
message PhotoItem{
|
||||
string name = 1; // 图片名称
|
||||
string identity = 2; // 图片唯一标识
|
||||
string product_identity = 3 [json_name="product_identity"]; // 所属产品唯一标识
|
||||
string url = 4; // 图片地址
|
||||
int32 sort = 5; // 排序方式
|
||||
string types = 6; // cover封面,img普通图片
|
||||
int64 id = 7; // 图片id
|
||||
}
|
||||
message CategoriesItem{
|
||||
int64 id = 1; //ID
|
||||
string identity = 2;
|
||||
string title = 3; //名称
|
||||
string en_title = 4 [json_name="en_title"]; //英文名称
|
||||
int64 parent_id = 5 [json_name="parent_id"]; //上级ID
|
||||
string paths = 6; //路径
|
||||
string intro = 7; //简介
|
||||
string icon = 8; //图标
|
||||
int32 sort = 9; //排序
|
||||
int32 status = 10; // 状态:1-正常,2停用
|
||||
string created_at = 11 [json_name="created_at"]; // 创建时间
|
||||
repeated CategoriesItem categories = 12; // 子集
|
||||
string keys = 13; //关键词
|
||||
}
|
||||
message ProductItem{
|
||||
int64 id = 1; //商品ID
|
||||
string identity = 2; //商品唯一码
|
||||
int64 supply_id = 3 [json_name="supply_id"]; //供应商ID
|
||||
repeated int64 category_id = 4 [json_name="category_id"]; //分类ID
|
||||
string title = 5; //商品标题
|
||||
string measuring_name = 6 [json_name="measuring_name"]; // 测量单位名称
|
||||
int64 sell_max = 7 [json_name="sell_max"]; // 最大限购数量
|
||||
int64 sell_min = 8 [json_name="sell_min"]; // 最小限购数量
|
||||
int64 wastage = 9; // 损耗率
|
||||
string standard_number = 10 [json_name="standard_number"]; // 产品标准号
|
||||
string brand = 11; // 品牌名称
|
||||
int64 stock_type = 12 [json_name="stock_type"]; // 库存计数方式:1-买方下单减库存,2-完成签约减库存
|
||||
int32 status = 13; // 商品状态:1-已上架,2-自动上架等待中,3-禁用 ,4-草稿,5-未上架
|
||||
string putaway_time = 14 [json_name="putaway_time"]; // 预定的上架时间 YYYY-MM-DD HH:mm:ss
|
||||
string cover_image = 15 [json_name="cover_image"]; //商品封面图片
|
||||
string content = 16; //商品详情
|
||||
int64 store_id = 17 [json_name="store_id"]; // 店铺的ID
|
||||
string store_identity = 18 [json_name="store_identity"]; // 店铺唯一标识
|
||||
int32 template_id = 19 [json_name="template_id"]; // 运费模板id
|
||||
string note = 20; // 备注
|
||||
repeated PhotoItem images = 21; // 产品图片
|
||||
repeated SpecItem specification = 22; // 产品规格信息
|
||||
int64 recent_number = 23 [json_name="recent_number"]; // 近期销售数量
|
||||
int64 sale_total = 24 [json_name="sale_total"]; // 销售总数量
|
||||
string created_at = 25 [json_name="created_at"]; // 创建时间
|
||||
int64 limitation = 26; // 区域限制:1不限制,2限制
|
||||
int64 liTemplate_id = 27 [json_name="liTemplate_id"]; // 区域限制的模板id
|
||||
int64 price = 28; // 售价(选择价格最低的规格数据)
|
||||
int64 stock = 29; // 库存(选择价格最低的规格数据)
|
||||
string category = 30; // 分类名称
|
||||
string serial_id = 31 [json_name="serial_id"]; // 产品序号
|
||||
int64 gas_types = 32 [json_name="gas_types"]; // 产品分类2:1查看非燃气商品;2按瓶计算的产品;3按kg计算的产品
|
||||
repeated int64 spec_id = 33 [json_name="spec_id"]; // 规格ID
|
||||
repeated CategoriesItem categories = 34;// 分类
|
||||
string supply_name = 35 [json_name="supply_name"];// 供应商名称
|
||||
}
|
||||
74
apps/ec/mall/proto/staff.proto
Normal file
74
apps/ec/mall/proto/staff.proto
Normal file
@@ -0,0 +1,74 @@
|
||||
syntax = "proto3";
|
||||
package mall;
|
||||
option go_package = ".;mall";
|
||||
import "blocks.proto";
|
||||
|
||||
// Store(店铺)微服务-工作人员
|
||||
service Staff {
|
||||
// 登录
|
||||
rpc Login(LoginRequest) returns (LoginReply) {}
|
||||
|
||||
// 获取工作人员列表
|
||||
rpc Fetch(FetchRequest) returns (StaffListReply) {}
|
||||
|
||||
// 创建工作人员
|
||||
rpc Create(StaffItem) returns (StatusReply) {}
|
||||
|
||||
// 删除工作人员
|
||||
rpc Delete(IdentRequest) returns (StatusReply) {}
|
||||
|
||||
// 获取个人信息
|
||||
rpc GetProfile(IdentRequest) returns (StaffItem) {}
|
||||
|
||||
// 设置个人信息
|
||||
rpc SetProfile(StaffItem) returns (StatusReply) {}
|
||||
|
||||
// 设置账号密码
|
||||
rpc SetPassword(SetAccountRequest) returns (StatusReply) {}
|
||||
}
|
||||
|
||||
message LoginRequest {
|
||||
string account = 1;
|
||||
string password = 2;
|
||||
string phone = 3;
|
||||
string verify_code = 4 [json_name="verify_code"];
|
||||
int32 login_genre = 5 [json_name="login_genre"]; // 登陆类型: 1 账密; 2 手机验证码
|
||||
}
|
||||
|
||||
message LoginReply {
|
||||
string token = 1; // token 授权码
|
||||
string identity = 2; // 唯一标识
|
||||
string store_identity = 3 [json_name="store_identity"]; // 店铺唯一标识
|
||||
string name = 4; // 姓名
|
||||
string account = 5; // 账号
|
||||
string role = 6; // 角色
|
||||
int32 status = 7; // 状态
|
||||
string created_at = 8 [json_name="created_at"]; // 创建时间
|
||||
string store_name = 9 [json_name="store_name"]; // 店铺名称
|
||||
}
|
||||
|
||||
message SetAccountRequest {
|
||||
string account = 1; // 账号
|
||||
string password = 2; // 密码
|
||||
string password_confirmed = 3 [json_name="password_confirmed"]; // 确认密码
|
||||
}
|
||||
|
||||
message StaffItem {
|
||||
int64 id = 1; // id
|
||||
string identity = 2; // 唯一标识
|
||||
string name = 3; // 姓名
|
||||
string account = 4; // 账号
|
||||
string password =5; // 密码
|
||||
string profile = 6; // 简介
|
||||
string role =7; // 角色
|
||||
string phone = 8; // 手机号
|
||||
string email = 9; // 邮箱
|
||||
int32 status = 10; // 状态:默认为0,-1禁止,1为正常
|
||||
string avatar = 11; // 头像
|
||||
string created_at = 12 [json_name="created_at"];
|
||||
}
|
||||
|
||||
message StaffListReply {
|
||||
repeated StaffItem data = 1;
|
||||
int64 count = 2;
|
||||
}
|
||||
109
apps/ec/mall/proto/store.proto
Normal file
109
apps/ec/mall/proto/store.proto
Normal file
@@ -0,0 +1,109 @@
|
||||
syntax = "proto3";
|
||||
package mall;
|
||||
option go_package = ".;mall";
|
||||
import "blocks.proto";
|
||||
|
||||
// Store(店铺)微服务-店铺基础服务
|
||||
service Store {
|
||||
|
||||
// 申请加入店铺
|
||||
rpc ApplyJoin(ApplyJoinRequest) returns (StatusReply) {};
|
||||
|
||||
// 店铺许可授权
|
||||
rpc Licensing(LicensingRequest) returns (StatusReply) {}
|
||||
|
||||
// 获取店铺基础配置
|
||||
rpc GetSetting(IdentRequest) returns(StoreBasic){};
|
||||
|
||||
// 设置店铺基础配置
|
||||
rpc SetSetting(StoreBasic) returns(StatusReply){};
|
||||
|
||||
// 设置支付方式配置
|
||||
rpc SetPayment(SettingRequest) returns(StatusReply){}
|
||||
|
||||
// 设置邮件服务器配置
|
||||
rpc SetEmail(SettingRequest) returns(StatusReply){}
|
||||
|
||||
// 获取支付方式配置
|
||||
rpc GetPayment(IdentRequest) returns(ConfigsReply){}
|
||||
|
||||
// 获取邮件服务器配置
|
||||
rpc GetEmail(IdentRequest) returns(ConfigsReply){}
|
||||
|
||||
// 获取小程序推荐码
|
||||
rpc MiniCode(MiniCodeRequest) returns(MiniCodeReply) {};
|
||||
|
||||
// 店铺搜索
|
||||
rpc Search(MallSearchRequest) returns(MallSearchReply) {};
|
||||
|
||||
}
|
||||
|
||||
message SettingRequest {
|
||||
string identity = 1; // 店铺唯一标识
|
||||
string configs = 2; // 配置说明:标准json字符串
|
||||
}
|
||||
|
||||
message ConfigsReply{
|
||||
string configs = 1;
|
||||
}
|
||||
|
||||
|
||||
message LicensingRequest {
|
||||
string license_type = 1 [json_name="license_type"]; // 授权类型
|
||||
string license = 2; // 许可码
|
||||
string domain = 3;
|
||||
string host = 4;
|
||||
string ip = 5;
|
||||
}
|
||||
|
||||
message ApplyJoinRequest {
|
||||
string logo=1; // 店铺 logo
|
||||
string title=2; // 店铺 标题
|
||||
string intro=3; // 店铺 描述说明
|
||||
string template=4; // 店铺 模板
|
||||
string configs=5; // 店铺 配置说明
|
||||
string subdomain=6; // 店铺 子域名设置
|
||||
string apply_remarks=7 [json_name="apply_remarks"]; // 申请备注
|
||||
|
||||
string name = 8; // 管理员 姓名
|
||||
string account = 9; // 管理员 帐号
|
||||
string phone = 10; // 管理员 手机号
|
||||
string email = 11; // 管理员 邮箱
|
||||
string password=12; // 管理员 密码
|
||||
|
||||
}
|
||||
|
||||
message StoreBasic{
|
||||
int64 id =1;
|
||||
string identity=2; //店铺唯一标识
|
||||
string logo=3; // logo
|
||||
string title=4; // 标题
|
||||
string intro=5; // 描述说明
|
||||
string template=6; // 模板
|
||||
string configs=7; // 配置说明
|
||||
string subdomain=8; // 子域名设置,可选
|
||||
string created_at = 9 [json_name="created_at"]; // 创建时间
|
||||
int32 status = 10;// 状态
|
||||
string keywords = 11;// SEO 关键词
|
||||
int32 approve = 12;// 审核状态:0待审核,1审核通过,2审核失败
|
||||
}
|
||||
|
||||
message MiniCodeRequest{
|
||||
string types = 1; // 类型:img-获取二维码base64码,path:获取二维码在oss上的地址
|
||||
}
|
||||
|
||||
message MiniCodeReply{
|
||||
string img = 1; // 返回的数据将会根据参数types的变动而变动
|
||||
}
|
||||
|
||||
message MallSearchRequest{
|
||||
int64 page_no=1 [json_name="page_no"]; // 页数
|
||||
int64 page_size=2 [json_name="page_size"]; // 每页记录数
|
||||
string keyword=3; // 关键字
|
||||
}
|
||||
|
||||
message MallSearchReply {
|
||||
repeated StoreBasic list = 1;
|
||||
int64 count = 2;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user