You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
1.0 KiB
22 lines
1.0 KiB
package model
|
|
|
|
import "time"
|
|
|
|
// AIProvider AI供应商模型
|
|
type AIProvider struct {
|
|
Id int64 `gorm:"column:id;primaryKey;autoIncrement" json:"id"`
|
|
Name string `gorm:"column:name;type:varchar(50);uniqueIndex;not null" json:"name"`
|
|
DisplayName string `gorm:"column:display_name;type:varchar(100);not null" json:"displayName"`
|
|
BaseUrl string `gorm:"column:base_url;type:varchar(255)" json:"baseUrl"`
|
|
SdkType string `gorm:"column:sdk_type;type:varchar(20);default:'openai_compat'" json:"sdkType"`
|
|
Protocol string `gorm:"column:protocol;type:varchar(20);default:'openai'" json:"protocol"`
|
|
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 (AIProvider) TableName() string {
|
|
return "ai_provider"
|
|
}
|
|
|