madipo2611 0d4b8b203e v0.0.2
2025-05-01 12:17:42 +03:00

29 lines
889 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package domain
import (
"time"
)
type AuditLog struct {
ID int `json:"id"`
UserID *int `json:"userId,omitempty"` // nil для неаутентифицированных действий
Action string `json:"action"` // "login", "password_change", "recovery_initiated"
EntityType string `json:"entityType"` // "user", "device", "session"
EntityID *int `json:"entityId,omitempty"`
IPAddress string `json:"ipAddress"`
UserAgent string `json:"userAgent"`
Metadata string `json:"metadata"` // JSON с дополнительными данными
Status string `json:"status"` // "success", "failed"
CreatedAt time.Time `json:"createdAt"`
}
type AuditFilter struct {
UserID *int
Action string
EntityType string
DateFrom time.Time
DateTo time.Time
Limit int
Offset int
}