diff --git a/model/log.go b/model/log.go index ed7ec2c7..86850a55 100644 --- a/model/log.go +++ b/model/log.go @@ -2,12 +2,13 @@ package model import ( "fmt" - "github.com/gin-gonic/gin" "one-api/common" "os" "strings" "time" + "github.com/gin-gonic/gin" + "github.com/bytedance/gopkg/util/gopool" "gorm.io/gorm" ) @@ -18,7 +19,7 @@ type Log struct { CreatedAt int64 `json:"created_at" gorm:"bigint;index:idx_created_at_id,priority:2;index:idx_created_at_type"` Type int `json:"type" gorm:"index:idx_created_at_type"` Content string `json:"content"` - Username string `json:"username" gorm:"index:index_username_model_name,priority:2;default:''"` + Username string `json:"username" gorm:"index;index:index_username_model_name,priority:2;default:''"` TokenName string `json:"token_name" gorm:"index;default:''"` ModelName string `json:"model_name" gorm:"index;index:index_username_model_name,priority:1;default:''"` Quota int `json:"quota" gorm:"default:0"`