2 Star 0 Fork 0

hero/momo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
logctx.go 3.63 KB
一键复制 编辑 原始数据 按行查看 历史
hero 提交于 2024-11-06 13:31 . upd:logctx列表和详情vo
package schema
import "gitee.com/linqwen/momo/base"
type LogCtxDTO struct {
Code string `gorm:"column:code" json:"Code" form:"Code" comment:"Code"`
Level string `gorm:"column:level" json:"Level" form:"Level" comment:"Level"`
Message string `gorm:"column:message" json:"Message" form:"Message" comment:"Message"`
Ip string `gorm:"column:ip" json:"Ip" form:"Ip" comment:"Ip"`
Path string `gorm:"column:path" json:"Path" form:"Path" comment:"Path"`
Method string `gorm:"column:method" json:"Method" form:"Method" comment:"Method"`
StatusCode int `gorm:"column:status_code" json:"StatusCode" form:"StatusCode" comment:"StatusCode"`
Headers string `gorm:"column:headers" json:"Headers" form:"Headers" comment:"Headers"`
Body string `gorm:"column:body" json:"Body" form:"Body" comment:"Body"`
Latency int64 `gorm:"column:latency" json:"Latency,string" form:"Latency" comment:"Latency"`
FileName string `gorm:"column:file_name" json:"FileName" form:"FileName" comment:"FileName"`
FuncName string `gorm:"column:func_name" json:"FuncName" form:"FuncName" comment:"FuncName"`
Data string `gorm:"column:data" json:"Data" form:"Data" comment:"Data"`
}
type LogCtxVO struct {
Id int64 `gorm:"primaryKey;autoIncrement:false" json:"Id,string"`
Code string `gorm:"column:code" json:"Code" form:"Code" comment:"Code"`
Level string `gorm:"column:level" json:"Level" form:"Level" comment:"Level"`
Message string `gorm:"column:message" json:"Message" form:"Message" comment:"Message"`
Ip string `gorm:"column:ip" json:"Ip" form:"Ip" comment:"Ip"`
Path string `gorm:"column:path" json:"Path" form:"Path" comment:"Path"`
Method string `gorm:"column:method" json:"Method" form:"Method" comment:"Method"`
StatusCode int `gorm:"column:status_code" json:"StatusCode" form:"StatusCode" comment:"StatusCode"`
Headers string `gorm:"column:headers" json:"Headers" form:"Headers" comment:"Headers"`
Body string `gorm:"column:body" json:"Body" form:"Body" comment:"Body"`
Latency int64 `gorm:"column:latency" json:"Latency,string" form:"Latency" comment:"Latency"`
FileName string `gorm:"column:file_name" json:"FileName" form:"FileName" comment:"FileName"`
FuncName string `gorm:"column:func_name" json:"FuncName" form:"FuncName" comment:"FuncName"`
Data string `gorm:"column:data" json:"Data" form:"Data" comment:"Data"`
CreatedAt base.ISO8601Time
UpdatedAt base.ISO8601Time
}
func (c LogCtxVO) GetDetailVO() interface{} { return c }
func (c LogCtxVO) GetListVO() interface{} {
vo := struct {
Id int64 `gorm:"primaryKey;autoIncrement:false" json:"Id,string"`
Code string `gorm:"column:code" json:"Code" form:"Code" comment:"Code"`
Level string `gorm:"column:level" json:"Level" form:"Level" comment:"Level"`
Message string `gorm:"column:message" json:"Message" form:"Message" comment:"Message"`
Ip string `gorm:"column:ip" json:"Ip" form:"Ip" comment:"Ip"`
Path string `gorm:"column:path" json:"Path" form:"Path" comment:"Path"`
Method string `gorm:"column:method" json:"Method" form:"Method" comment:"Method"`
StatusCode int `gorm:"column:status_code" json:"StatusCode" form:"StatusCode" comment:"StatusCode"`
Latency int64 `gorm:"column:latency" json:"Latency,string" form:"Latency" comment:"Latency"`
CreatedAt base.ISO8601Time
UpdatedAt base.ISO8601Time
}{
Id: c.Id,
Code: c.Code,
Level: c.Level,
Message: c.Message,
Ip: c.Ip,
Path: c.Path,
Method: c.Method,
StatusCode: c.StatusCode,
Latency: c.Latency,
CreatedAt: c.CreatedAt,
}
return vo
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/linqwen/momo.git
git@gitee.com:linqwen/momo.git
linqwen
momo
momo
v1.0.6

搜索帮助