chore(init): 初始化解忧商行项目并完成 Phase 0 基座

This commit is contained in:
yml2213
2026-10-30 11:46:10 +08:00
commit 8d9481c251
689 changed files with 138703 additions and 0 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"
}