From f1a6bb042fef39dfbfaad12190a2ab3cc22a087e Mon Sep 17 00:00:00 2001 From: tbphp Date: Fri, 25 Jul 2025 14:08:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E9=95=BF=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/models/types.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/models/types.go b/internal/models/types.go index 37ec4db..057e2ab 100644 --- a/internal/models/types.go +++ b/internal/models/types.go @@ -62,7 +62,7 @@ type Group struct { // APIKey 对应 api_keys 表 type APIKey struct { ID uint `gorm:"primaryKey;autoIncrement" json:"id"` - KeyValue string `gorm:"type:varchar(512);not null;uniqueIndex:idx_group_key" json:"key_value"` + KeyValue string `gorm:"type:varchar(1024);not null;uniqueIndex:idx_group_key" json:"key_value"` GroupID uint `gorm:"not null;uniqueIndex:idx_group_key" json:"group_id"` Status string `gorm:"type:varchar(50);not null;default:'active'" json:"status"` RequestCount int64 `gorm:"not null;default:0" json:"request_count"` @@ -78,9 +78,9 @@ type RequestLog struct { Timestamp time.Time `gorm:"not null;index" json:"timestamp"` GroupID uint `gorm:"not null;index" json:"group_id"` GroupName string `gorm:"type:varchar(255);index" json:"group_name"` - KeyValue string `gorm:"type:varchar(512)" json:"key_value"` + KeyValue string `gorm:"type:varchar(1024)" json:"key_value"` IsSuccess bool `gorm:"not null" json:"is_success"` - SourceIP string `gorm:"type:varchar(45)" json:"source_ip"` + SourceIP string `gorm:"type:varchar(64)" json:"source_ip"` StatusCode int `gorm:"not null" json:"status_code"` RequestPath string `gorm:"type:varchar(500)" json:"request_path"` Duration int64 `gorm:"not null" json:"duration_ms"`