Skip to content

feat(settings): add typed UserSettings JSON model and repository#24

Merged
ZenonEl merged 1 commit into
mainfrom
refactor/json-settings
Mar 28, 2026
Merged

feat(settings): add typed UserSettings JSON model and repository#24
ZenonEl merged 1 commit into
mainfrom
refactor/json-settings

Conversation

@ZenonEl
Copy link
Copy Markdown
Owner

@ZenonEl ZenonEl commented Mar 28, 2026

Summary

  • Add SettingsJson column to Users table (migration + fresh schema)
  • Add typed UserSettings model with DistributionSettings, PrivacyUserSettings, SiteFilterSettings
  • Add IUserSettingsRepository interface + SQLite implementation
  • Register in DI
  • Old tables/interfaces untouched — this adds new capability alongside existing

Relates to #3

Files

  • New: Domain/Models/UserSettings.cs
  • New: Database/Interfaces/IUserSettingsRepository.cs
  • New: Database/Repositories/SqLite/UserSettingsRepository.cs
  • New: Database/Migrations/AddSettingsJsonColumn.cs
  • Modified: Database/BaseDBMigration.cs, Database/DBInit.cs

Test plan

  • dotnet build passes (verified)
  • Migration adds SettingsJson column to existing Users tables
  • Fresh DB gets SettingsJson column
  • GetSettings returns default UserSettings for users without JSON
  • SaveSettings persists and round-trips correctly

Add SettingsJson TEXT column to Users table alongside existing
DefaultUsersActions/PrivacySettings tables. This introduces the new
JSON-based settings infrastructure without breaking existing callers.

- UserSettings domain model with Distribution/Privacy sections
- IUserSettingsRepository interface + SQLite Dapper implementation
- FluentMigrator migration for existing databases
- DI registration in DBInit
@ZenonEl ZenonEl merged commit 89395f7 into main Mar 28, 2026
1 check passed
@ZenonEl ZenonEl deleted the refactor/json-settings branch March 28, 2026 03:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant