This commit is contained in:
2025-03-29 17:38:05 +08:00
parent 7d46f7178d
commit d94b2744c0
21 changed files with 4337 additions and 137 deletions

59
proto/category.proto Normal file
View 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; //
}