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"`
}
