2026-02-02 22:13:50 +08:00
|
|
|
|
package domain
|
|
|
|
|
|
|
|
|
|
|
|
// Status constants
|
|
|
|
|
|
const (
|
|
|
|
|
|
StatusActive = "active"
|
|
|
|
|
|
StatusDisabled = "disabled"
|
|
|
|
|
|
StatusError = "error"
|
|
|
|
|
|
StatusUnused = "unused"
|
|
|
|
|
|
StatusUsed = "used"
|
|
|
|
|
|
StatusExpired = "expired"
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
// Role constants
|
|
|
|
|
|
const (
|
|
|
|
|
|
RoleAdmin = "admin"
|
|
|
|
|
|
RoleUser = "user"
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
// Platform constants
|
|
|
|
|
|
const (
|
|
|
|
|
|
PlatformAnthropic = "anthropic"
|
|
|
|
|
|
PlatformOpenAI = "openai"
|
|
|
|
|
|
PlatformGemini = "gemini"
|
|
|
|
|
|
PlatformAntigravity = "antigravity"
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
// Account type constants
|
|
|
|
|
|
const (
|
|
|
|
|
|
AccountTypeOAuth = "oauth" // OAuth类型账号(full scope: profile + inference)
|
|
|
|
|
|
AccountTypeSetupToken = "setup-token" // Setup Token类型账号(inference only scope)
|
|
|
|
|
|
AccountTypeAPIKey = "apikey" // API Key类型账号
|
2026-02-02 22:20:08 +08:00
|
|
|
|
AccountTypeUpstream = "upstream" // 上游透传类型账号(通过 Base URL + API Key 连接上游)
|
2026-02-02 22:13:50 +08:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
// Redeem type constants
|
|
|
|
|
|
const (
|
|
|
|
|
|
RedeemTypeBalance = "balance"
|
|
|
|
|
|
RedeemTypeConcurrency = "concurrency"
|
|
|
|
|
|
RedeemTypeSubscription = "subscription"
|
2026-01-29 16:29:59 +08:00
|
|
|
|
RedeemTypeInvitation = "invitation"
|
2026-02-02 22:13:50 +08:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
// PromoCode status constants
|
|
|
|
|
|
const (
|
|
|
|
|
|
PromoCodeStatusActive = "active"
|
|
|
|
|
|
PromoCodeStatusDisabled = "disabled"
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
// Admin adjustment type constants
|
|
|
|
|
|
const (
|
|
|
|
|
|
AdjustmentTypeAdminBalance = "admin_balance" // 管理员调整余额
|
|
|
|
|
|
AdjustmentTypeAdminConcurrency = "admin_concurrency" // 管理员调整并发数
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
// Group subscription type constants
|
|
|
|
|
|
const (
|
|
|
|
|
|
SubscriptionTypeStandard = "standard" // 标准计费模式(按余额扣费)
|
|
|
|
|
|
SubscriptionTypeSubscription = "subscription" // 订阅模式(按限额控制)
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
// Subscription status constants
|
|
|
|
|
|
const (
|
|
|
|
|
|
SubscriptionStatusActive = "active"
|
|
|
|
|
|
SubscriptionStatusExpired = "expired"
|
|
|
|
|
|
SubscriptionStatusSuspended = "suspended"
|
|
|
|
|
|
)
|