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" }