♻️ Refactored event audit system

This commit is contained in:
2025-03-15 16:37:47 +08:00
parent 35e5eadb05
commit 32e91e2601
15 changed files with 113 additions and 69 deletions

View File

@ -1,13 +1,15 @@
package models
import "gorm.io/datatypes"
type ActionEvent struct {
BaseModel
Type string `json:"type"`
Target string `json:"target"`
Location string `json:"location"`
IpAddress string `json:"ip_address"`
UserAgent string `json:"user_agent"`
Type string `json:"type"`
Metadata datatypes.JSONMap `json:"metadata"`
Location string `json:"location"`
IpAddress string `json:"ip_address"`
UserAgent string `json:"user_agent"`
Account Account `json:"account"`
AccountID uint `json:"account_id"`