Files
full/apps/base/cms/proto/blocks.proto

74 lines
2.4 KiB
Protocol Buffer

syntax = "proto3";
package cms;
option go_package = ".;cms";
// 列表请求参数
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:category_id=?,vlaue=11
}
// 唯一标识请求参数
message IdentRequest{
int64 id = 1; // 唯一ID
string identity = 2; // 唯一标识
}
// 时序版本号请求参数
message VersionRequest {
int64 version = 1; // 时序版本号
}
// 搜索请求参数
message SearchRequest {
string keyword = 1; //<必传>, 关键词
int64 page_no = 2 [json_name = "page_no"]; // 页数
int64 page_size = 3 [json_name = "page_size"]; // 每页记录数
}
message StatusReply{
int32 code = 1; // 状态码
string message = 2; // 状态说明
string details = 3; // 数据
int64 timeseq = 4; // 响应时间序列
}
// 空结构请求
message Empty{
}
// 分类
message CategoryItem{
string site_identity = 1 [json_name = "site_identity"];
int64 id = 2;
string identity = 3; // 唯一标识
int64 parent_id = 4 [json_name = "parent_id"]; // 为空表示顶级分类
string title = 5; // 标题
string cover_path = 6 [json_name = "cover_path"]; // 封面图片
string intro = 7; // 简介
string created_at = 8 [json_name = "created_at"]; // 创建时间
string updated_at = 9 [json_name = "updated_at"]; // 更新时间
repeated CategoryItem child = 10; // 子集
string category_key = 11 [json_name = "category_key"];// 分类标识
}
// 标签
message TagsItem{
int64 id = 1;
string identity = 2; // 唯一标识
string title = 3; // 标题
string cover_path = 4 [json_name = "cover_path"]; // 封面图片
string intro = 5; // 简介
string created_at = 6 [json_name = "created_at"]; //创建时间
}
// 附件
message AccessoryItem{
string identity = 1; // 唯一标识
string title = 2; // 附件标题
string file_path = 3 [json_name = "file_path"]; // 附件文件路径
string created_at = 4 [json_name = "created_at"]; //创建时间
}