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

48 lines
1.4 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";
// Store(店铺)微服务-分类
service Category{
// 获取分类数据
rpc Fetch(CategoryFetchRequest) returns(CategoryReply) {};
// 添加分类
rpc Create(CategoryItem) returns(blocks.IdentityStatusReply) {};
// 删除分类
rpc Delete(blocks.IdentRequest) returns(blocks.IdentityStatusReply) {};
// 修改分类
rpc Modify(CategoryItem) returns(blocks.IdentityStatusReply) {};
}
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; //关键词
}