refactor: localize protobuf definitions

This commit is contained in:
2026-08-09 20:14:57 +08:00
parent 9f6f318bbb
commit 5ea45a76fe
429 changed files with 54058 additions and 61623 deletions

View File

@@ -7,7 +7,6 @@
package cms
import (
protobuf "bsm/full/protobuf"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
@@ -26,7 +25,7 @@ const (
type CategoryListReply struct {
state protoimpl.MessageState `protogen:"open.v1"`
// 数据
Data []*protobuf.CmsCategoryItem `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"`
Data []*CmsCategoryItem `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"`
// 总数
Count int64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
unknownFields protoimpl.UnknownFields
@@ -63,7 +62,7 @@ func (*CategoryListReply) Descriptor() ([]byte, []int) {
return file_module_base_cms_proto_category_proto_rawDescGZIP(), []int{0}
}
func (x *CategoryListReply) GetData() []*protobuf.CmsCategoryItem {
func (x *CategoryListReply) GetData() []*CmsCategoryItem {
if x != nil {
return x.Data
}
@@ -124,16 +123,16 @@ func (x *AddCategoryResponse) GetIdentity() string {
// 添加分类请求
type AddCategoryRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
SiteIdentity string `protobuf:"bytes,1,opt,name=site_identity,proto3" json:"site_identity,omitempty"`
Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 添加分类请求唯一码
ParentId int64 `protobuf:"varint,3,opt,name=parent_id,proto3" json:"parent_id,omitempty"` // 为空表示顶级分类
Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"` // 标题
CoverPath string `protobuf:"bytes,5,opt,name=cover_path,proto3" json:"cover_path,omitempty"` // 封面图片
Intro string `protobuf:"bytes,6,opt,name=intro,proto3" json:"intro,omitempty"` // 简介
CreatedAt string `protobuf:"bytes,7,opt,name=created_at,proto3" json:"created_at,omitempty"` // 创建时间
UpdatedAt string `protobuf:"bytes,8,opt,name=updated_at,proto3" json:"updated_at,omitempty"` // 更新时间
Data []*protobuf.CmsCategoryItem `protobuf:"bytes,9,rep,name=data,proto3" json:"data,omitempty"` // 子集
state protoimpl.MessageState `protogen:"open.v1"`
SiteIdentity string `protobuf:"bytes,1,opt,name=site_identity,proto3" json:"site_identity,omitempty"`
Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 添加分类请求唯一码
ParentId int64 `protobuf:"varint,3,opt,name=parent_id,proto3" json:"parent_id,omitempty"` // 为空表示顶级分类
Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"` // 标题
CoverPath string `protobuf:"bytes,5,opt,name=cover_path,proto3" json:"cover_path,omitempty"` // 封面图片
Intro string `protobuf:"bytes,6,opt,name=intro,proto3" json:"intro,omitempty"` // 简介
CreatedAt string `protobuf:"bytes,7,opt,name=created_at,proto3" json:"created_at,omitempty"` // 创建时间
UpdatedAt string `protobuf:"bytes,8,opt,name=updated_at,proto3" json:"updated_at,omitempty"` // 更新时间
Data []*CmsCategoryItem `protobuf:"bytes,9,rep,name=data,proto3" json:"data,omitempty"` // 子集
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -224,7 +223,7 @@ func (x *AddCategoryRequest) GetUpdatedAt() string {
return ""
}
func (x *AddCategoryRequest) GetData() []*protobuf.CmsCategoryItem {
func (x *AddCategoryRequest) GetData() []*CmsCategoryItem {
if x != nil {
return x.Data
}
@@ -233,17 +232,17 @@ func (x *AddCategoryRequest) GetData() []*protobuf.CmsCategoryItem {
// 修改分类请求
type ModifyCategoryRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
SiteIdentity string `protobuf:"bytes,1,opt,name=site_identity,proto3" json:"site_identity,omitempty"`
Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 修改分类请求唯一标识
ParentId int64 `protobuf:"varint,3,opt,name=parent_id,proto3" json:"parent_id,omitempty"` // 为空表示顶级分类
Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"` // 标题
CoverPath string `protobuf:"bytes,5,opt,name=cover_path,proto3" json:"cover_path,omitempty"` // 封面图片
Intro string `protobuf:"bytes,6,opt,name=intro,proto3" json:"intro,omitempty"` // 简介
CreatedAt string `protobuf:"bytes,7,opt,name=created_at,proto3" json:"created_at,omitempty"` // 创建时间
UpdatedAt string `protobuf:"bytes,8,opt,name=updated_at,proto3" json:"updated_at,omitempty"` // 更新时间
Data []*protobuf.CmsCategoryItem `protobuf:"bytes,9,rep,name=data,proto3" json:"data,omitempty"` // 子集
CategoryKey string `protobuf:"bytes,10,opt,name=category_key,proto3" json:"category_key,omitempty"` // 分类标识
state protoimpl.MessageState `protogen:"open.v1"`
SiteIdentity string `protobuf:"bytes,1,opt,name=site_identity,proto3" json:"site_identity,omitempty"`
Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 修改分类请求唯一标识
ParentId int64 `protobuf:"varint,3,opt,name=parent_id,proto3" json:"parent_id,omitempty"` // 为空表示顶级分类
Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"` // 标题
CoverPath string `protobuf:"bytes,5,opt,name=cover_path,proto3" json:"cover_path,omitempty"` // 封面图片
Intro string `protobuf:"bytes,6,opt,name=intro,proto3" json:"intro,omitempty"` // 简介
CreatedAt string `protobuf:"bytes,7,opt,name=created_at,proto3" json:"created_at,omitempty"` // 创建时间
UpdatedAt string `protobuf:"bytes,8,opt,name=updated_at,proto3" json:"updated_at,omitempty"` // 更新时间
Data []*CmsCategoryItem `protobuf:"bytes,9,rep,name=data,proto3" json:"data,omitempty"` // 子集
CategoryKey string `protobuf:"bytes,10,opt,name=category_key,proto3" json:"category_key,omitempty"` // 分类标识
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -334,7 +333,7 @@ func (x *ModifyCategoryRequest) GetUpdatedAt() string {
return ""
}
func (x *ModifyCategoryRequest) GetData() []*protobuf.CmsCategoryItem {
func (x *ModifyCategoryRequest) GetData() []*CmsCategoryItem {
if x != nil {
return x.Data
}
@@ -442,7 +441,7 @@ var File_module_base_cms_proto_category_proto protoreflect.FileDescriptor
const file_module_base_cms_proto_category_proto_rawDesc = "" +
"\n" +
"$module/base/cms/proto/category.proto\x12\x03cms\x1a\x15protobuf/blocks.proto\"V\n" +
"$module/base/cms/proto/category.proto\x12\x03cms\x1a!module/base/cms/proto/const.proto\"V\n" +
"\x11CategoryListReply\x12+\n" +
"\x04data\x18\x01 \x03(\v2\x17.blocks.CmsCategoryItemR\x04data\x12\x14\n" +
"\x05count\x18\x02 \x01(\x03R\x05count\"1\n" +
@@ -506,15 +505,15 @@ func file_module_base_cms_proto_category_proto_rawDescGZIP() []byte {
var file_module_base_cms_proto_category_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_module_base_cms_proto_category_proto_goTypes = []any{
(*CategoryListReply)(nil), // 0: cms.CategoryListReply
(*AddCategoryResponse)(nil), // 1: cms.AddCategoryResponse
(*AddCategoryRequest)(nil), // 2: cms.AddCategoryRequest
(*ModifyCategoryRequest)(nil), // 3: cms.ModifyCategoryRequest
(*DeleteCategoryRequest)(nil), // 4: cms.DeleteCategoryRequest
(*KeywordRequest)(nil), // 5: cms.KeywordRequest
(*protobuf.CmsCategoryItem)(nil), // 6: blocks.CmsCategoryItem
(*protobuf.IdentRequest)(nil), // 7: blocks.IdentRequest
(*protobuf.StatusReply)(nil), // 8: blocks.StatusReply
(*CategoryListReply)(nil), // 0: cms.CategoryListReply
(*AddCategoryResponse)(nil), // 1: cms.AddCategoryResponse
(*AddCategoryRequest)(nil), // 2: cms.AddCategoryRequest
(*ModifyCategoryRequest)(nil), // 3: cms.ModifyCategoryRequest
(*DeleteCategoryRequest)(nil), // 4: cms.DeleteCategoryRequest
(*KeywordRequest)(nil), // 5: cms.KeywordRequest
(*CmsCategoryItem)(nil), // 6: blocks.CmsCategoryItem
(*IdentRequest)(nil), // 7: blocks.IdentRequest
(*StatusReply)(nil), // 8: blocks.StatusReply
}
var file_module_base_cms_proto_category_proto_depIdxs = []int32{
6, // 0: cms.CategoryListReply.data:type_name -> blocks.CmsCategoryItem
@@ -540,6 +539,7 @@ func file_module_base_cms_proto_category_proto_init() {
if File_module_base_cms_proto_category_proto != nil {
return
}
file_module_base_cms_proto_const_proto_init()
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{