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
b3beb412
authored
Jul 18, 2025
by
feitianbubu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: mySQL does not support default false
parent
94f4d58a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
model/log.go
+1
-1
model/token.go
+2
-2
No files found.
model/log.go
View file @
b3beb412
...
...
@@ -27,7 +27,7 @@ type Log struct {
PromptTokens
int
`json:"prompt_tokens" gorm:"default:0"`
CompletionTokens
int
`json:"completion_tokens" gorm:"default:0"`
UseTime
int
`json:"use_time" gorm:"default:0"`
IsStream
bool
`json:"is_stream"
gorm:"default:false"
`
IsStream
bool
`json:"is_stream"`
ChannelId
int
`json:"channel" gorm:"index"`
ChannelName
string
`json:"channel_name" gorm:"->"`
TokenId
int
`json:"token_id" gorm:"default:0;index"`
...
...
model/token.go
View file @
b3beb412
...
...
@@ -20,8 +20,8 @@ type Token struct {
AccessedTime
int64
`json:"accessed_time" gorm:"bigint"`
ExpiredTime
int64
`json:"expired_time" gorm:"bigint;default:-1"`
// -1 means never expired
RemainQuota
int
`json:"remain_quota" gorm:"default:0"`
UnlimitedQuota
bool
`json:"unlimited_quota"
gorm:"default:false"
`
ModelLimitsEnabled
bool
`json:"model_limits_enabled"
gorm:"default:false"
`
UnlimitedQuota
bool
`json:"unlimited_quota"`
ModelLimitsEnabled
bool
`json:"model_limits_enabled"`
ModelLimits
string
`json:"model_limits" gorm:"type:varchar(1024);default:''"`
AllowIps
*
string
`json:"allow_ips" gorm:"default:''"`
UsedQuota
int
`json:"used_quota" gorm:"default:0"`
// used quota
...
...
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