1Panel/backend/app/model/logs.go

32 lines
987 B
Go
Raw Normal View History

2022-08-16 15:30:23 +00:00
package model
import (
"time"
)
type OperationLog struct {
2022-09-01 08:48:43 +00:00
BaseModel
2023-02-07 10:48:32 +00:00
Source string `gorm:"type:varchar(64)" json:"source"`
2022-08-16 15:30:23 +00:00
IP string `gorm:"type:varchar(64)" json:"ip"`
Path string `gorm:"type:varchar(64)" json:"path"`
Method string `gorm:"type:varchar(64)" json:"method"`
UserAgent string `gorm:"type:varchar(256)" json:"userAgent"`
Latency time.Duration `gorm:"type:varchar(64)" json:"latency"`
Status string `gorm:"type:varchar(64)" json:"status"`
Message string `gorm:"type:varchar(256)" json:"message"`
2022-08-16 15:30:23 +00:00
DetailZH string `gorm:"type:varchar(256)" json:"detailZH"`
DetailEN string `gorm:"type:varchar(256)" json:"detailEN"`
2022-08-16 15:30:23 +00:00
}
2022-11-15 09:20:57 +00:00
type LoginLog struct {
BaseModel
IP string `gorm:"type:varchar(64)" json:"ip"`
Address string `gorm:"type:varchar(64)" json:"address"`
Agent string `gorm:"type:varchar(256)" json:"agent"`
Status string `gorm:"type:varchar(64)" json:"status"`
Message string `gorm:"type:longText" json:"message"`
}