chore: 初始化仓库,导入项目基线代码
Academy v0.8.3 完整代码基线:Go 后端(internal/cmd/cli/mcp-server/docreader)、 Vue 前端(frontend)、数据库迁移(migrations)、部署编排(docker/helm/deploy)与文档。 今日开发的培训推送管理改动随后单独提交。
This commit is contained in:
commit
7ec21f35b0
5767 files changed
+1436788
No files matched your search
@@ -0,0 +1,36 @@
|
||||
package handler
|
||||
|
||||
// Response envelopes for Swagger annotations. Handlers write these shapes
|
||||
// with gin.H; the types only exist so the documented body matches. Compose
|
||||
// the payload in the annotation, e.g.
|
||||
//
|
||||
// @Success 200 {object} handler.DataResponse{data=types.Knowledge}
|
||||
// @Success 200 {object} handler.PageResponse{data=[]types.Knowledge}
|
||||
|
||||
// DataResponse is the {"success": true, "data": ...} body.
|
||||
type DataResponse struct {
|
||||
Success bool `json:"success" example:"true"`
|
||||
Data any `json:"data"`
|
||||
}
|
||||
|
||||
// PageResponse is a page of a list with the total match count.
|
||||
type PageResponse struct {
|
||||
Success bool `json:"success" example:"true"`
|
||||
Data any `json:"data"`
|
||||
Total int64 `json:"total" extensions:"x-agent"`
|
||||
Page int `json:"page" extensions:"x-agent"`
|
||||
PageSize int `json:"page_size" extensions:"x-agent"`
|
||||
}
|
||||
|
||||
// DataMessageResponse is DataResponse with a human-readable message.
|
||||
type DataMessageResponse struct {
|
||||
Success bool `json:"success" example:"true"`
|
||||
Message string `json:"message"`
|
||||
Data any `json:"data"`
|
||||
}
|
||||
|
||||
// MessageResponse is the {"success": true, "message": ...} body.
|
||||
type MessageResponse struct {
|
||||
Success bool `json:"success" example:"true" extensions:"x-agent"`
|
||||
Message string `json:"message"`
|
||||
}
|
||||
Reference in new issue
Block a user