完成了“后台审计日志”

This commit is contained in:
yml
2026-05-22 17:48:46 +08:00
parent c9e6ea2b71
commit 8afd94ca35
12 changed files with 399 additions and 2 deletions
@@ -0,0 +1,29 @@
package adminaudit
import (
"time"
"gorm.io/datatypes"
)
type Query struct {
ActorID uint64
Action string
BizType string
Limit int
}
type LogDTO struct {
ID uint64 `json:"id"`
ActorType string `json:"actor_type"`
ActorID uint64 `json:"actor_id"`
ActorUsername string `json:"actor_username"`
ActorNickname string `json:"actor_nickname"`
Action string `json:"action"`
BizType string `json:"biz_type"`
BizID *uint64 `json:"biz_id"`
IP string `json:"ip"`
UserAgent string `json:"user_agent"`
Detail datatypes.JSON `json:"detail"`
CreatedAt time.Time `json:"created_at"`
}