dev
This commit is contained in:
59
proto/category.proto
Normal file
59
proto/category.proto
Normal file
@@ -0,0 +1,59 @@
|
||||
syntax = "proto3";
|
||||
package content;
|
||||
option go_package = "./;content";
|
||||
import "blocks.proto";
|
||||
|
||||
// 系统分类
|
||||
service Category {
|
||||
//分类列表
|
||||
rpc CategoryList (Empty) returns (CategoryListReply) {};
|
||||
rpc AddCategory (AddCategoryRequest) returns (AddCategoryResponse) {};
|
||||
rpc ModifyCategory (ModifyCategoryRequest) returns (Empty) {};
|
||||
rpc DeleteCategory (DeleteCategoryRequest) returns (Empty) {};
|
||||
}
|
||||
|
||||
// 无限极分类
|
||||
message CategoryItem{
|
||||
string identity = 1;
|
||||
string parent_identity = 2; // 为空表示顶级分类
|
||||
string title = 3;
|
||||
string cover_path = 4;
|
||||
string intro=5;
|
||||
string created_at = 6;
|
||||
string updated_at = 7;
|
||||
repeated CategoryItem data = 8;
|
||||
}
|
||||
|
||||
message CategoryListReply {
|
||||
repeated CategoryItem data = 1;
|
||||
int64 count = 2;
|
||||
}
|
||||
|
||||
message AddCategoryResponse{
|
||||
string identity = 1; // 新增数据的唯一码
|
||||
}
|
||||
|
||||
message AddCategoryRequest{
|
||||
string identity = 1; //
|
||||
string parent_identity = 2; // 为空表示顶级分类
|
||||
string title = 3;
|
||||
string cover_path = 4;
|
||||
string intro=5;
|
||||
string created_at = 6;
|
||||
string updated_at = 7;
|
||||
repeated CategoryItem data = 8;
|
||||
}
|
||||
message ModifyCategoryRequest{
|
||||
string identity = 1; //
|
||||
string parent_identity = 2; // 为空表示顶级分类
|
||||
string title = 3;
|
||||
string cover_path = 4;
|
||||
string intro=5;
|
||||
string created_at = 6;
|
||||
string updated_at = 7;
|
||||
repeated CategoryItem data = 8;
|
||||
}
|
||||
|
||||
message DeleteCategoryRequest{
|
||||
string identity = 1; //
|
||||
}
|
||||
Reference in New Issue
Block a user