mirror of
https://github.com/EZ-Api/ez-api.git
synced 2026-01-13 17:47:51 +00:00
19 lines
647 B
Go
19 lines
647 B
Go
package model
|
|
|
|
import "gorm.io/gorm"
|
|
|
|
// OperationLog stores admin actions for audit.
|
|
type OperationLog struct {
|
|
gorm.Model
|
|
Actor string `gorm:"size:100" json:"actor"`
|
|
Method string `gorm:"size:10" json:"method"`
|
|
Path string `gorm:"size:255" json:"path"`
|
|
Query string `gorm:"size:2048" json:"query"`
|
|
StatusCode int `json:"status_code"`
|
|
LatencyMs int64 `json:"latency_ms"`
|
|
ClientIP string `gorm:"size:64" json:"client_ip"`
|
|
RequestID string `gorm:"size:64" json:"request_id"`
|
|
UserAgent string `gorm:"size:255" json:"user_agent"`
|
|
ErrorMessage string `gorm:"size:1024" json:"error_message"`
|
|
}
|