package model type ActionLog struct { BaseModel UserID uint `json:"user_id"` Username string `json:"username"` Action string `json:"action"` IP string `json:"ip"` UserAgent string `json:"user_agent"` Path string `json:"path"` Method string `json:"method"` Request string `json:"request" gorm:"type:text"` Response string `json:"response" gorm:"type:text"` Status int `json:"status"` Latency int64 `json:"latency"` // 毫秒 }