16 lines
633 B
Go
16 lines
633 B
Go
package model
|
||
|
||
import "time"
|
||
|
||
// SiteAIRuntime 单例行(id=1):管理员配置的 AI 上游地址与密钥,优先于 ai_config.json
|
||
type SiteAIRuntime struct {
|
||
ID uint `gorm:"primaryKey" json:"id"`
|
||
APIBase string `gorm:"type:varchar(512)" json:"api_base"`
|
||
APIKey string `gorm:"type:varchar(2048)" json:"-"`
|
||
DefaultModel string `gorm:"type:varchar(120)" json:"default_model"`
|
||
DefaultProv string `gorm:"type:varchar(64)" json:"default_provider"`
|
||
UpdatedAt time.Time `json:"updated_at"`
|
||
}
|
||
|
||
func (SiteAIRuntime) TableName() string { return "site_ai_runtime" }
|