autocode 修复swag相关功能

This commit is contained in:
梁俊景
2020-12-26 20:35:26 +08:00
parent cab8de721f
commit 5d1bcb3575
9 changed files with 64 additions and 24 deletions
+6 -1
View File
@@ -11,6 +11,11 @@ type GetById struct {
Id float64 `json:"id" form:"id"`
}
// Find by id structure
type GetByIdUnit struct {
Id uint `json:"id" form:"id"`
}
type IdsReq struct {
Ids []int `json:"ids" form:"ids"`
}
@@ -20,4 +25,4 @@ type GetAuthorityId struct {
AuthorityId string
}
type Empty struct {}
type Empty struct{}
+16 -2
View File
@@ -1,8 +1,22 @@
package request
import "gin-vue-admin/model"
import "gin-vue-admin/global"
type SysOperationRecordCreate struct {
global.GVA_MODEL
Ip string `json:"ip" form:"ip" gorm:"column:ip;comment:请求ip"`
Method string `json:"method" form:"method" gorm:"column:method;comment:请求方法"`
Path string `json:"path" form:"path" gorm:"column:path;comment:请求路径"`
Status int `json:"status" form:"status" gorm:"column:status;comment:请求状态"`
Latency int `json:"latency" form:"latency" gorm:"column:latency;comment:延迟"`
Agent string `json:"agent" form:"agent" gorm:"column:agent;comment:代理"`
ErrorMessage string `json:"error_message" form:"error_message" gorm:"column:error_message;comment:错误信息"`
Body string `json:"body" form:"body" gorm:"type:longtext;column:body;comment:请求Body"`
Resp string `json:"resp" form:"resp" gorm:"type:longtext;column:resp;comment:响应Body"`
UserID int `json:"user_id" form:"user_id" gorm:"column:user_id;comment:用户id"`
}
type SysOperationRecordSearch struct {
model.SysOperationRecord
SysOperationRecordCreate
PageInfo
}