user_settings.go 2.3 KB

1234567891011121314151617181920212223242526
  1. package dto
  2. type UserSetting struct {
  3. NotifyType string `json:"notify_type,omitempty"` // QuotaWarningType 额度预警类型
  4. QuotaWarningThreshold float64 `json:"quota_warning_threshold,omitempty"` // QuotaWarningThreshold 额度预警阈值
  5. WebhookUrl string `json:"webhook_url,omitempty"` // WebhookUrl webhook地址
  6. WebhookSecret string `json:"webhook_secret,omitempty"` // WebhookSecret webhook密钥
  7. NotificationEmail string `json:"notification_email,omitempty"` // NotificationEmail 通知邮箱地址
  8. BarkUrl string `json:"bark_url,omitempty"` // BarkUrl Bark推送URL
  9. GotifyUrl string `json:"gotify_url,omitempty"` // GotifyUrl Gotify服务器地址
  10. GotifyToken string `json:"gotify_token,omitempty"` // GotifyToken Gotify应用令牌
  11. GotifyPriority int `json:"gotify_priority"` // GotifyPriority Gotify消息优先级
  12. UpstreamModelUpdateNotifyEnabled bool `json:"upstream_model_update_notify_enabled,omitempty"` // 是否接收上游模型更新定时检测通知(仅管理员)
  13. AcceptUnsetRatioModel bool `json:"accept_unset_model_ratio_model,omitempty"` // AcceptUnsetRatioModel 是否接受未设置价格的模型
  14. RecordIpLog bool `json:"record_ip_log,omitempty"` // 是否记录请求和错误日志IP
  15. SidebarModules string `json:"sidebar_modules,omitempty"` // SidebarModules 左侧边栏模块配置
  16. BillingPreference string `json:"billing_preference,omitempty"` // BillingPreference 扣费策略(订阅/钱包)
  17. Language string `json:"language,omitempty"` // Language 用户语言偏好 (zh, en)
  18. }
  19. var (
  20. NotifyTypeEmail = "email" // Email 邮件
  21. NotifyTypeWebhook = "webhook" // Webhook
  22. NotifyTypeBark = "bark" // Bark 推送
  23. NotifyTypeGotify = "gotify" // Gotify 推送
  24. )