package model

type AuditLog struct {
	Base
	UserID       *uint64 `json:"user_id"`
	Action       string  `gorm:"size:150;not null" json:"action"`
	ResourceType string  `gorm:"size:120;not null" json:"resource_type"`
	ResourceID   string  `gorm:"size:255" json:"resource_id"`
	Metadata     JSONB   `gorm:"type:json;default:'{}'" json:"metadata"`
	BeforeState  JSONB   `gorm:"type:json;default:'{}'" json:"before_state"`
	AfterState   JSONB   `gorm:"type:json;default:'{}'" json:"after_state"`
	IPAddress    string  `gorm:"size:64" json:"ip_address"`
	UserAgent    string  `gorm:"size:255" json:"user_agent"`
}
