Dockerfile
This commit is contained in:
95
model/dto/app/application_dto.go
Normal file
95
model/dto/app/application_dto.go
Normal file
@@ -0,0 +1,95 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"cid/consts/app"
|
||||
entity "cid/model/entity/app"
|
||||
|
||||
"gitea.com/red-future/common/beans"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// CreateApplicationReq 创建应用请求
|
||||
type CreateApplicationReq struct {
|
||||
g.Meta `path:"/createApplication" method:"post" tags:"应用管理" summary:"创建应用" dc:"创建新的应用"`
|
||||
Name string `json:"name" v:"required" dc:"应用名称"`
|
||||
AppCode string `json:"appCode" v:"required" dc:"应用编码(唯一标识)"`
|
||||
Type app.AppType `json:"type" v:"required" dc:"应用类型"`
|
||||
Status app.AppStatus `json:"status" dc:"应用状态" d:"active"`
|
||||
Description string `json:"description" dc:"应用描述"`
|
||||
AccessConfig map[string]interface{} `json:"accessConfig" dc:"接入配置"`
|
||||
LimitConfig map[string]interface{} `json:"limitConfig" dc:"限流配置"`
|
||||
CallbackConfig map[string]interface{} `json:"callbackConfig" dc:"回调配置"`
|
||||
}
|
||||
|
||||
// CreateApplicationRes 创建应用响应
|
||||
type CreateApplicationRes struct {
|
||||
Id int64 `json:"id" dc:"应用ID"`
|
||||
}
|
||||
|
||||
// ListApplicationReq 获取应用列表请求
|
||||
type ListApplicationReq struct {
|
||||
g.Meta `path:"/listApplications" method:"get" tags:"应用管理" summary:"获取应用列表" dc:"分页查询应用列表"`
|
||||
*beans.Page
|
||||
Name string `json:"name" dc:"应用名称"`
|
||||
AppCode string `json:"appCode" dc:"应用编码"`
|
||||
Type app.AppType `json:"type" dc:"应用类型"`
|
||||
Status app.AppStatus `json:"status" dc:"应用状态"`
|
||||
Keyword string `json:"keyword" dc:"关键字(搜索应用名称或编码)"`
|
||||
}
|
||||
|
||||
// ListApplicationRes 获取应用列表响应
|
||||
type ListApplicationRes struct {
|
||||
List []ApplicationItem `json:"list" dc:"应用列表"`
|
||||
Total int `json:"total" dc:"总数"`
|
||||
}
|
||||
|
||||
type ApplicationItem struct {
|
||||
Id int64 `json:"id,string"`
|
||||
Name string `json:"name"`
|
||||
AppCode string `json:"appCode"`
|
||||
Type app.AppType `json:"type"`
|
||||
TypeName string `json:"typeName"`
|
||||
Status app.AppStatus `json:"status"`
|
||||
StatusName string `json:"statusName"`
|
||||
Description string `json:"description"`
|
||||
CreatedAt int64 `json:"createdAt"`
|
||||
UpdatedAt int64 `json:"updatedAt"`
|
||||
}
|
||||
|
||||
// GetApplicationReq 获取应用详情请求
|
||||
type GetApplicationReq struct {
|
||||
g.Meta `path:"/getApplication" method:"get" tags:"应用管理" summary:"获取应用详情" dc:"获取应用详情"`
|
||||
Id int64 `json:"id" v:"required" dc:"应用ID"`
|
||||
}
|
||||
|
||||
// GetApplicationRes 获取应用详情响应
|
||||
type GetApplicationRes struct {
|
||||
*entity.Application
|
||||
}
|
||||
|
||||
// UpdateApplicationReq 更新应用请求
|
||||
type UpdateApplicationReq struct {
|
||||
g.Meta `path:"/updateApplication" method:"put" tags:"应用管理" summary:"更新应用" dc:"更新应用信息"`
|
||||
Id int64 `json:"id" v:"required" dc:"应用ID"`
|
||||
Name string `json:"name" dc:"应用名称"`
|
||||
AppCode string `json:"appCode" dc:"应用编码"`
|
||||
Type app.AppType `json:"type" dc:"应用类型"`
|
||||
Status app.AppStatus `json:"status,omitempty" dc:"应用状态"`
|
||||
Description string `json:"description" dc:"应用描述"`
|
||||
AccessConfig map[string]interface{} `json:"accessConfig" dc:"接入配置"`
|
||||
LimitConfig map[string]interface{} `json:"limitConfig" dc:"限流配置"`
|
||||
CallbackConfig map[string]interface{} `json:"callbackConfig" dc:"回调配置"`
|
||||
}
|
||||
|
||||
// DeleteApplicationReq 删除应用请求
|
||||
type DeleteApplicationReq struct {
|
||||
g.Meta `path:"/deleteApplication" method:"delete" tags:"应用管理" summary:"删除应用" dc:"删除应用"`
|
||||
Id int64 `json:"id" v:"required" dc:"应用ID"`
|
||||
}
|
||||
|
||||
// UpdateApplicationStatusReq 更新应用状态请求
|
||||
type UpdateApplicationStatusReq struct {
|
||||
g.Meta `path:"/updateApplicationStatus" method:"put" tags:"应用管理" summary:"更新应用状态" dc:"更新应用状态"`
|
||||
Id int64 `json:"id" v:"required" dc:"应用ID"`
|
||||
Status app.AppStatus `json:"status" v:"required|in:active,inactive" dc:"状态:active启用/inactive停用"`
|
||||
}
|
||||
Reference in New Issue
Block a user