feat:0666账号密码自动登录刷新Token

This commit is contained in:
2026-11-03 12:13:39 +08:00
parent 4dbec33dbd
commit f69cdc6d8e
12 changed files with 741 additions and 11 deletions
+5
View File
@@ -40,6 +40,11 @@ type RockConfig struct {
AutoDeliveryEnabled bool `gorm:"not null;default:true" json:"auto_delivery_enabled"` // 全局自动发货总开关
BaseURL string `gorm:"size:255;not null;default:'https://0666.pro'" json:"base_url"` // 默认值见 RockDefaultBaseURL
BearerToken string `gorm:"type:text;not null;default:''" json:"bearer_token"`
LoginUsername string `gorm:"size:128;not null;default:''" json:"login_username"`
LoginPasswordCiphertext string `gorm:"type:text;not null;default:''" json:"-"`
LoginPasswordSet bool `gorm:"-" json:"login_password_set"`
LastTokenRefreshAt *time.Time `json:"last_token_refresh_at,omitempty"`
LastTokenError string `gorm:"type:text;not null;default:''" json:"last_token_error,omitempty"`
Username string `gorm:"size:128;not null;default:''" json:"username"`
Points float64 `gorm:"type:numeric(12,2);not null;default:0.00" json:"points"`
MinPointsWarning float64 `gorm:"type:numeric(12,2);not null;default:1050.00" json:"min_points_warning"`