Files
janus/internal/model/provider.go
T
yangzhaohan a18e4847c2 feat(core): 新增基础仓库接口及相关模型仓库定义
- 新增 BaseRepository 泛型接口,定义通用增删改查方法
- 实现 BaseRepo 结构体及其 Insert 方法
- 定义 ProviderRepository、ModelRepository、ChannelRepository、APIKeyRepository 接口,继承基础接口
- 将模型结构 JanusModel 和 JanusProvider 重命名为 Model 和 Provider
- 创建 ProviderRepo 结构体,组合基础仓库实现 Provider 仓库功能
2026-07-15 00:06:54 +08:00

18 lines
454 B
Go

package model
import (
"synoth.com/janus/internal/core"
"synoth.com/janus/internal/enum"
)
// Provider 服务提供商
type Provider struct {
core.BaseModel
// Name 服务供应商名称
Name string `gorm:"uniqueIndex;size:100;not null" json:"name"`
// BaseURL 服务地址
BaseURL string `gorm:"size:255;not null" json:"base_url"`
// Status 服务状态(1=启用,0=停用)
Status enum.Status `gorm:"default:1;not null" json:"status"`
}