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.
20 lines
794 B
20 lines
794 B
package model
|
|
|
|
import "time"
|
|
|
|
// AIApiKey AI API密钥
|
|
type AIApiKey struct {
|
|
Id int64 `gorm:"column:id;primaryKey;autoIncrement" json:"id"`
|
|
ProviderId int64 `gorm:"column:provider_id;index;not null" json:"providerId"`
|
|
UserId int64 `gorm:"column:user_id;index;default:0" json:"userId"`
|
|
KeyValue string `gorm:"column:key_value;type:text;not null" json:"-"`
|
|
IsActive bool `gorm:"column:is_active;default:true" json:"isActive"`
|
|
Remark string `gorm:"column:remark;type:varchar(255)" json:"remark"`
|
|
CreatedAt time.Time `gorm:"column:created_at;autoCreateTime" json:"createdAt"`
|
|
UpdatedAt time.Time `gorm:"column:updated_at;autoUpdateTime" json:"updatedAt"`
|
|
}
|
|
|
|
// TableName 指定表名
|
|
func (AIApiKey) TableName() string {
|
|
return "ai_api_key"
|
|
}
|
|
|