任务执行1-19

This commit is contained in:
zxr
2026-06-26 12:51:50 +08:00
parent 175d9f8f94
commit 19908230f2
19 changed files with 2615 additions and 1260 deletions

View File

@@ -0,0 +1,28 @@
package models
import "time"
type AuditLog struct {
ID uint `gorm:"primaryKey" json:"id"`
CreatedAt time.Time `json:"created_at"`
TraceID string `gorm:"size:96;index" json:"trace_id"`
SourceService string `gorm:"size:64;index" json:"source_service"`
ActorID string `gorm:"size:128;index" json:"actor_id"`
ActorName string `gorm:"size:128" json:"actor_name"`
Action string `gorm:"size:128;index" json:"action"`
ObjectType string `gorm:"size:128;index" json:"object_type"`
ObjectID string `gorm:"size:128;index" json:"object_id"`
OperationRisk string `gorm:"size:32;index" json:"operation_risk"`
ApprovalID string `gorm:"size:128;index" json:"approval_id"`
RequestMethod string `gorm:"size:16" json:"request_method"`
RequestPath string `gorm:"size:512" json:"request_path"`
ClientIP string `gorm:"size:64" json:"client_ip"`
BeforeJSON string `gorm:"type:text" json:"before_json"`
AfterJSON string `gorm:"type:text" json:"after_json"`
Result string `gorm:"size:32;index" json:"result"`
ErrorMessage string `gorm:"type:text" json:"error_message"`
}
func (AuditLog) TableName() string {
return "logs_audit_logs"
}