From 981e5234400ed655e20964b263ffefb990902e85 Mon Sep 17 00:00:00 2001 From: huang <1724659546@qq.com> Date: Tue, 30 Sep 2025 22:42:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/infra/models/execution.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/infra/models/execution.go b/internal/infra/models/execution.go index d549cd7..96c55d9 100644 --- a/internal/infra/models/execution.go +++ b/internal/infra/models/execution.go @@ -184,7 +184,7 @@ type UserActionLog struct { Time time.Time `gorm:"primaryKey" json:"time"` // --- Who (谁) --- - UserID uint `gorm:"primaryKey" json:"user_id,omitempty"` + UserID uint `gorm:"not null" json:"user_id,omitempty"` Username string `json:"username,omitempty"` // 操作发生时用户名的快照 // --- Where (何地) ---