package model import "time" // AIModel AI模型配置 type AIModel struct { Id int64 `gorm:"column:id;primaryKey;autoIncrement" json:"id"` ProviderId int64 `gorm:"column:provider_id;index;not null" json:"providerId"` ModelId string `gorm:"column:model_id;type:varchar(100);not null" json:"modelId"` DisplayName string `gorm:"column:display_name;type:varchar(100)" json:"displayName"` InputPrice float64 `gorm:"column:input_price;type:decimal(10,6);default:0" json:"inputPrice"` OutputPrice float64 `gorm:"column:output_price;type:decimal(10,6);default:0" json:"outputPrice"` MaxTokens int `gorm:"column:max_tokens;default:4096" json:"maxTokens"` ContextWindow int `gorm:"column:context_window;default:128000" json:"contextWindow"` SupportsStream bool `gorm:"column:supports_stream;default:true" json:"supportsStream"` SupportsVision bool `gorm:"column:supports_vision;default:false" json:"supportsVision"` IsActive bool `gorm:"column:is_active;default:true" json:"isActive"` SortOrder int `gorm:"column:sort_order;default:0" json:"sortOrder"` CreatedAt time.Time `gorm:"column:created_at;autoCreateTime" json:"createdAt"` UpdatedAt time.Time `gorm:"column:updated_at;autoUpdateTime" json:"updatedAt"` } // TableName 指定表名 func (AIModel) TableName() string { return "ai_model" }