🎨 优化项目结构 && 完善ai配置
This commit is contained in:
@@ -1,27 +1,14 @@
|
||||
package request
|
||||
|
||||
// CreateApiRequest 创建API请求
|
||||
type CreateApiRequest struct {
|
||||
Path string `json:"path" binding:"required"`
|
||||
Description string `json:"description"`
|
||||
ApiGroup string `json:"apiGroup" binding:"required"`
|
||||
Method string `json:"method" binding:"required,oneof=GET POST PUT DELETE PATCH"`
|
||||
}
|
||||
import (
|
||||
"git.echol.cn/loser/ai_proxy/server/model/common/request"
|
||||
"git.echol.cn/loser/ai_proxy/server/model/system"
|
||||
)
|
||||
|
||||
// UpdateApiRequest 更新API请求
|
||||
type UpdateApiRequest struct {
|
||||
ID uint `json:"id" binding:"required"`
|
||||
Path string `json:"path" binding:"required"`
|
||||
Description string `json:"description"`
|
||||
ApiGroup string `json:"apiGroup" binding:"required"`
|
||||
Method string `json:"method" binding:"required,oneof=GET POST PUT DELETE PATCH"`
|
||||
}
|
||||
|
||||
// GetApiListRequest 获取API列表请求
|
||||
type GetApiListRequest struct {
|
||||
Page int `json:"page" form:"page"`
|
||||
PageSize int `json:"pageSize" form:"pageSize"`
|
||||
Path string `json:"path" form:"path"`
|
||||
ApiGroup string `json:"apiGroup" form:"apiGroup"`
|
||||
Method string `json:"method" form:"method"`
|
||||
// api分页条件查询及排序结构体
|
||||
type SearchApiParams struct {
|
||||
system.SysApi
|
||||
request.PageInfo
|
||||
OrderKey string `json:"orderKey"` // 排序
|
||||
Desc bool `json:"desc"` // 排序方式:升序false(默认)|降序true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user