refactor: centralize protobuf and remove go-zero

This commit is contained in:
2026-08-09 15:10:19 +08:00
parent 5cc5fd92ed
commit 4bbed3156c
357 changed files with 14208 additions and 19903 deletions

View File

@@ -1,27 +1,27 @@
syntax = "proto3";
package cms;
option go_package = ".;cms";
import "blocks.proto";
option go_package = "bsm/full/module/base/cms/pb;cms";
import "protobuf/blocks.proto";
// CMS - 分类
service Category {
// 分类列表
rpc Fetch (IdentRequest) returns (CategoryListReply) {};
rpc Fetch (blocks.IdentRequest) returns (CategoryListReply) {};
// 添加分类
rpc Create (CategoryItem) returns (StatusReply) {};
rpc Create (blocks.CmsCategoryItem) returns (blocks.StatusReply) {};
// 修改分类
rpc Modify (ModifyCategoryRequest) returns (StatusReply) {};
rpc Modify (ModifyCategoryRequest) returns (blocks.StatusReply) {};
// 删除分类
rpc Delete (DeleteCategoryRequest) returns (StatusReply) {};
rpc Delete (DeleteCategoryRequest) returns (blocks.StatusReply) {};
}
// 分类列表
message CategoryListReply {
// 数据
repeated CategoryItem data = 1;
repeated blocks.CmsCategoryItem data = 1;
// 总数
int64 count = 2;
}
@@ -41,7 +41,7 @@ message AddCategoryRequest{
string intro = 6; // 简介
string created_at = 7 [json_name = "created_at"]; // 创建时间
string updated_at = 8 [json_name = "updated_at"]; // 更新时间
repeated CategoryItem data = 9; // 子集
repeated blocks.CmsCategoryItem data = 9; // 子集
}
// 修改分类请求
@@ -54,7 +54,7 @@ message ModifyCategoryRequest{
string intro = 6; // 简介
string created_at = 7 [json_name = "created_at"]; // 创建时间
string updated_at = 8 [json_name = "updated_at"]; // 更新时间
repeated CategoryItem data = 9; // 子集
repeated blocks.CmsCategoryItem data = 9; // 子集
string category_key = 10[json_name = "category_key"]; // 分类标识
}