This commit is contained in:
2025-09-30 17:44:18 +08:00
parent 898339fd5d
commit f4b7e6e2df
393 changed files with 4530 additions and 2061 deletions

View File

@@ -7,9 +7,10 @@ info (
)
// 功能管理接口
@server(
@server (
prefix: /api/v1/admin/feature
group: admin_feature
group: admin_feature
middleware: AdminAuthInterceptor
)
service main {
// 创建功能
@@ -31,76 +32,97 @@ service main {
// 获取功能详情
@handler AdminGetFeatureDetail
get /detail/:id (AdminGetFeatureDetailReq) returns (AdminGetFeatureDetailResp)
// 配置功能示例数据
@handler AdminConfigFeatureExample
post /config-example (AdminConfigFeatureExampleReq) returns (AdminConfigFeatureExampleResp)
// 查看功能示例数据
@handler AdminGetFeatureExample
get /example/:feature_id (AdminGetFeatureExampleReq) returns (AdminGetFeatureExampleResp)
}
type (
// 创建功能请求
AdminCreateFeatureReq {
ApiId string `json:"api_id"` // API标识
Name string `json:"name"` // 描述
Name string `json:"name"` // 描述
}
// 创建功能响应
AdminCreateFeatureResp {
Id int64 `json:"id"` // 功能ID
}
// 更新功能请求
AdminUpdateFeatureReq {
Id int64 `path:"id"` // 功能ID
Id int64 `path:"id"` // 功能ID
ApiId *string `json:"api_id,optional"` // API标识
Name *string `json:"name,optional"` // 描述
Name *string `json:"name,optional"` // 描述
}
// 更新功能响应
AdminUpdateFeatureResp {
Success bool `json:"success"` // 是否成功
}
// 删除功能请求
AdminDeleteFeatureReq {
Id int64 `path:"id"` // 功能ID
}
// 删除功能响应
AdminDeleteFeatureResp {
Success bool `json:"success"` // 是否成功
}
// 获取功能列表请求
AdminGetFeatureListReq {
Page int64 `form:"page"` // 页码
PageSize int64 `form:"pageSize"` // 每页数量
Page int64 `form:"page"` // 页码
PageSize int64 `form:"pageSize"` // 每页数量
ApiId *string `form:"api_id,optional"` // API标识
Name *string `form:"name,optional"` // 描述
Name *string `form:"name,optional"` // 描述
}
// 功能列表项
FeatureListItem {
Id int64 `json:"id"` // 功能ID
ApiId string `json:"api_id"` // API标识
Name string `json:"name"` // 描述
Id int64 `json:"id"` // 功能ID
ApiId string `json:"api_id"` // API标识
Name string `json:"name"` // 描述
CreateTime string `json:"create_time"` // 创建时间
UpdateTime string `json:"update_time"` // 更新时间
}
// 获取功能列表响应
AdminGetFeatureListResp {
Total int64 `json:"total"` // 总数
Items []FeatureListItem `json:"items"` // 列表数据
}
// 获取功能详情请求
AdminGetFeatureDetailReq {
Id int64 `path:"id"` // 功能ID
}
// 获取功能详情响应
AdminGetFeatureDetailResp {
Id int64 `json:"id"` // 功能ID
ApiId string `json:"api_id"` // API标识
Name string `json:"name"` // 描述
Id int64 `json:"id"` // 功能ID
ApiId string `json:"api_id"` // API标识
Name string `json:"name"` // 描述
CreateTime string `json:"create_time"` // 创建时间
UpdateTime string `json:"update_time"` // 更新时间
}
)
// 配置功能示例数据请求
AdminConfigFeatureExampleReq {
FeatureId int64 `json:"feature_id"` // 功能ID
Data string `json:"data"` // 示例数据JSON
}
// 配置功能示例数据响应
AdminConfigFeatureExampleResp {
Success bool `json:"success"` // 是否成功
}
// 查看功能示例数据请求
AdminGetFeatureExampleReq {
FeatureId int64 `path:"feature_id"` // 功能ID
}
// 查看功能示例数据响应
AdminGetFeatureExampleResp {
Id int64 `json:"id"` // 示例数据ID
FeatureId int64 `json:"feature_id"` // 功能ID
ApiId string `json:"api_id"` // API标识
Data string `json:"data"` // 示例数据JSON
CreateTime string `json:"create_time"` // 创建时间
UpdateTime string `json:"update_time"` // 更新时间
}
)