2026-08-09 10:43:45 +08:00
|
|
|
|
syntax = "proto3";
|
|
|
|
|
|
package mall;
|
2026-08-09 15:10:19 +08:00
|
|
|
|
option go_package = "bsm/full/module/ec/mall/pb;mall";
|
2026-08-09 20:14:57 +08:00
|
|
|
|
import "module/ec/mall/proto/const.proto";
|
2026-08-09 10:43:45 +08:00
|
|
|
|
|
|
|
|
|
|
// Store(店铺)微服务-分类
|
|
|
|
|
|
service Category{
|
|
|
|
|
|
// 获取分类数据
|
|
|
|
|
|
rpc Fetch(CategoryFetchRequest) returns(CategoryReply) {};
|
|
|
|
|
|
|
|
|
|
|
|
// 添加分类
|
2026-08-09 15:10:19 +08:00
|
|
|
|
rpc Create(CategoryItem) returns(blocks.IdentityStatusReply) {};
|
2026-08-09 10:43:45 +08:00
|
|
|
|
|
|
|
|
|
|
// 删除分类
|
2026-08-09 15:10:19 +08:00
|
|
|
|
rpc Delete(blocks.IdentRequest) returns(blocks.IdentityStatusReply) {};
|
2026-08-09 10:43:45 +08:00
|
|
|
|
|
|
|
|
|
|
// 修改分类
|
2026-08-09 15:10:19 +08:00
|
|
|
|
rpc Modify(CategoryItem) returns(blocks.IdentityStatusReply) {};
|
2026-08-09 10:43:45 +08:00
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
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; //关键词
|
|
|
|
|
|
}
|