第 5 阶段:纠纷、通知与后台-1

This commit is contained in:
yml
2026-05-22 16:34:32 +08:00
parent 9ebdfab078
commit 99f9df7bcd
32 changed files with 1711 additions and 8 deletions
+24
View File
@@ -0,0 +1,24 @@
package model
import (
"time"
"gorm.io/datatypes"
)
type AuditLog struct {
ID uint64 `gorm:"primaryKey" json:"id"`
ActorType string `gorm:"size:32;not null" json:"actor_type"`
ActorID uint64 `gorm:"not null;index" json:"actor_id"`
Action string `gorm:"size:64;not null" json:"action"`
BizType string `gorm:"size:32;not null" json:"biz_type"`
BizID *uint64 `json:"biz_id"`
IP string `gorm:"size:64;not null;default:''" json:"ip"`
UserAgent string `gorm:"size:512;not null;default:''" json:"user_agent"`
Detail datatypes.JSON `json:"detail"`
CreatedAt time.Time `json:"created_at"`
}
func (AuditLog) TableName() string {
return "audit_logs"
}