Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
35cd4fde
authored
Mar 02, 2025
by
1808837298@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor: Add index to Username column in Log model
parent
3f1e3403
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
model/log.go
+3
-2
No files found.
model/log.go
View file @
35cd4fde
...
...
@@ -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"`
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment