package model import ( "synoth.com/janus/internal/core" "synoth.com/janus/internal/enum" ) // Channel 路由转发通道 type Channel struct { core.BaseModel // Name 通道名称 Name string `gorm:"size:100;not null" json:"name"` // ProviderID 供应商ID ProviderID int64 `gorm:"not null" json:"provider_id"` // ModelID 模型ID(NULL表示供应商级别通道) ModelID *int64 `json:"model_id"` // Weight 负载均衡权重 Weight int `gorm:"default:1;not null" json:"weight"` // Priority 优先级(数字越小越高) Priority int `gorm:"default:1;not null" json:"priority"` // RateLimit 每分钟请求数上限 RateLimit int `gorm:"default:60;not null" json:"rate_limit"` // Status 通道状态 Status enum.Status `gorm:"default:1;not null" json:"status"` }