chore: add "user_configs" db table (#16564)

This commit is contained in:
ケイラ
2025-03-05 10:46:03 -07:00
committed by GitHub
parent cc946f199d
commit 9041646b81
47 changed files with 786 additions and 394 deletions

View File

@ -54,9 +54,11 @@ type ReducedUser struct {
UpdatedAt time.Time `json:"updated_at" table:"updated at" format:"date-time"`
LastSeenAt time.Time `json:"last_seen_at" format:"date-time"`
Status UserStatus `json:"status" table:"status" enums:"active,suspended"`
LoginType LoginType `json:"login_type"`
ThemePreference string `json:"theme_preference"`
Status UserStatus `json:"status" table:"status" enums:"active,suspended"`
LoginType LoginType `json:"login_type"`
// Deprecated: this value should be retrieved from
// `codersdk.UserPreferenceSettings` instead.
ThemePreference string `json:"theme_preference,omitempty"`
}
// User represents a user in Coder.
@ -187,6 +189,10 @@ type ValidateUserPasswordResponse struct {
Details string `json:"details"`
}
type UserAppearanceSettings struct {
ThemePreference string `json:"theme_preference"`
}
type UpdateUserAppearanceSettingsRequest struct {
ThemePreference string `json:"theme_preference" validate:"required"`
}