Skip to content

Commit

Permalink
fix: big int
Browse files Browse the repository at this point in the history
  • Loading branch information
zijiren233 committed Nov 15, 2024
1 parent 9687470 commit c10fcc3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion service/aiproxy/model/channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ type Channel struct {
Balance float64 `json:"balance"`
ResponseDuration int64 `gorm:"bigint" json:"response_duration"`
ID int `gorm:"primaryKey" json:"id"`
UsedAmount float64 `gorm:"bigint" json:"used_amount"`
UsedAmount float64 `json:"used_amount"`
RequestCount int `gorm:"type:int" json:"request_count"`
Status int `gorm:"default:1;index" json:"status"`
Type int `gorm:"default:0;index" json:"type"`
Expand Down
2 changes: 1 addition & 1 deletion service/aiproxy/model/group.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type Group struct {
ID string `gorm:"primaryKey" json:"id"`
Tokens []*Token `gorm:"foreignKey:GroupID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE" json:"-"`
Status int `gorm:"type:int;default:1;index" json:"status"`
UsedAmount float64 `gorm:"bigint;index" json:"used_amount"`
UsedAmount float64 `gorm:"index" json:"used_amount"`
QPM int64 `gorm:"bigint" json:"qpm"`
RequestCount int `gorm:"type:int;index" json:"request_count"`
}
Expand Down
4 changes: 2 additions & 2 deletions service/aiproxy/model/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ type Token struct {
Models []string `gorm:"serializer:json;type:text" json:"models"`
Status int `gorm:"default:1;index" json:"status"`
ID int `gorm:"primaryKey" json:"id"`
Quota float64 `gorm:"bigint" json:"quota"`
UsedAmount float64 `gorm:"bigint" json:"used_amount"`
Quota float64 `json:"quota"`
UsedAmount float64 `gorm:"index" json:"used_amount"`
RequestCount int `gorm:"type:int" json:"request_count"`
}

Expand Down

0 comments on commit c10fcc3

Please sign in to comment.