2022-08-16 23:30:23 +08:00
|
|
|
package model
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
|
|
|
type OperationLog struct {
|
2022-09-01 16:48:43 +08:00
|
|
|
BaseModel
|
2023-02-07 18:48:32 +08:00
|
|
|
Source string `gorm:"type:varchar(64)" json:"source"`
|
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"`
|
|
|
|
}
|