2022-08-16 23:30:23 +08:00
|
|
|
package model
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
|
|
|
type OperationLog struct {
|
2022-09-01 16:48:43 +08:00
|
|
|
BaseModel
|
2022-12-13 18:54:28 +08:00
|
|
|
Group string `gorm:"type:varchar(64)" json:"group"`
|
2022-08-16 23:30:23 +08: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"`
|
2022-12-13 18:54:28 +08:00
|
|
|
Status string `gorm:"type:varchar(64)" json:"status"`
|
|
|
|
Message string `gorm:"type:varchar(256)" json:"message"`
|
2022-08-16 23:30:23 +08:00
|
|
|
|
2022-12-13 18:54:28 +08:00
|
|
|
DetailZH string `gorm:"type:varchar(256)" json:"detailZH"`
|
|
|
|
DetailEN string `gorm:"type:varchar(256)" json:"detailEN"`
|
2022-08-16 23:30:23 +08:00
|
|
|
}
|
2022-11-15 17:20:57 +08: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"`
|
|
|
|
}
|