mirror of
				https://github.com/linux-do/new-api.git
				synced 2025-11-04 13:23:42 +08:00 
			
		
		
		
	fix: 减少group和model字段长度为64
This commit is contained in:
		@@ -6,8 +6,8 @@ import (
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type Ability struct {
 | 
			
		||||
	Group     string `json:"group" gorm:"type:varchar(255);primaryKey;autoIncrement:false"`
 | 
			
		||||
	Model     string `json:"model" gorm:"primaryKey;autoIncrement:false"`
 | 
			
		||||
	Group     string `json:"group" gorm:"type:varchar(64);primaryKey;autoIncrement:false"`
 | 
			
		||||
	Model     string `json:"model" gorm:"type:varchar(64);primaryKey;autoIncrement:false"`
 | 
			
		||||
	ChannelId int    `json:"channel_id" gorm:"primaryKey;autoIncrement:false;index"`
 | 
			
		||||
	Enabled   bool   `json:"enabled"`
 | 
			
		||||
	Priority  *int64 `json:"priority" gorm:"bigint;default:0;index"`
 | 
			
		||||
 
 | 
			
		||||
@@ -21,7 +21,7 @@ type Channel struct {
 | 
			
		||||
	Balance            float64 `json:"balance"` // in USD
 | 
			
		||||
	BalanceUpdatedTime int64   `json:"balance_updated_time" gorm:"bigint"`
 | 
			
		||||
	Models             string  `json:"models"`
 | 
			
		||||
	Group              string  `json:"group" gorm:"type:varchar(255);default:'default'"`
 | 
			
		||||
	Group              string  `json:"group" gorm:"type:varchar(64);default:'default'"`
 | 
			
		||||
	UsedQuota          int64   `json:"used_quota" gorm:"bigint;default:0"`
 | 
			
		||||
	ModelMapping       *string `json:"model_mapping" gorm:"type:varchar(1024);default:''"`
 | 
			
		||||
	Priority           *int64  `json:"priority" gorm:"bigint;default:0"`
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user