happyDomain/model
Pierre-Olivier Mercier ce9da66a76 model: add UserQuota struct for admin-controlled per-user limits
Introduce a UserQuota field on the User model to hold admin-controlled
limits and flags that the user cannot modify. Only checker-related
fields are defined for now (max checks per day, retention days,
inactivity pause days, scheduling kill switch); future paid-plan
attributes will be added here later.

The user-facing API only exposes settings updates and account deletion,
so Quota cannot be written through it. Updates go through the existing
admin user PUT endpoint, with a new editor card in the admin UI under
/users/[uid].
2026-04-15 19:30:14 +07:00
..
api.go chore: replace interface{} with any across the codebase 2026-03-01 17:38:04 +07:00
auth_user.go Add readonly struct tags to immutable model fields 2026-04-04 22:05:28 +07:00
authentication.go Clean architecture refactoring 2025-04-22 14:15:03 +02:00
backup.go Remove plural structs not used as struct 2025-05-22 15:46:06 +02:00
captcha.go Add Altcha captcha provider support 2026-02-13 12:29:14 +07:00
change_password.go Clean architecture refactoring 2025-04-22 14:15:03 +02:00
checker.go checkers: introduce checker subsystem foundation 2026-04-15 19:30:13 +07:00
checker_test.go checkers: introduce checker subsystem foundation 2026-04-15 19:30:13 +07:00
config.go checkers: add API controllers, routes, and app wiring 2026-04-15 19:30:14 +07:00
correction.go Add binding:required tags and narrow input types for API endpoints 2026-04-04 22:05:28 +07:00
domain.go checkers: add incremental scheduler updates on domain/zone changes 2026-04-15 19:30:14 +07:00
domain_test.go Add comprehensive test coverage for model package 2026-01-09 15:34:31 +07:00
errors.go checkers: add usecases, engine, and scheduler 2026-04-15 19:30:13 +07:00
errors_test.go Add comprehensive test coverage for model package 2026-01-09 15:34:31 +07:00
form.go checkers: introduce checker subsystem foundation 2026-04-15 19:30:13 +07:00
hexastring.go Relicense the project to AGPL-3.0 2023-12-24 11:42:00 +01:00
hexastring_test.go Add comprehensive test coverage for model package 2026-01-09 15:34:31 +07:00
identifier.go Clean architecture refactoring 2025-04-22 14:15:03 +02:00
identifier_test.go Add comprehensive test coverage for model package 2026-01-09 15:34:31 +07:00
insight.go insights: Send stats about users' settings 2025-06-12 20:07:57 +02:00
iterators.go chore: replace interface{} with any across the codebase 2026-03-01 17:38:04 +07:00
login.go security: decouple failure tracking from captcha provider 2026-03-12 15:03:49 +07:00
logs.go Add readonly struct tags to immutable model fields 2026-04-04 22:05:28 +07:00
mailer.go Refactor usecases: create intermediate structs to facilitate tests 2025-05-28 23:02:22 +02:00
newsletter.go Clean architecture refactoring 2025-04-22 14:15:03 +02:00
oidc.go Move config struct to model, avoid dependancy to storage 2025-05-28 22:00:02 +02:00
orchestrator.go Rework zone diff/apply flow: separate diff from provider API, support partial apply 2026-03-16 19:46:09 +07:00
provider.go Add readonly struct tags to immutable model fields 2026-04-04 22:05:28 +07:00
provider_settings.go Add context.Context to ProviderUsecase and DomainUsecase interfaces 2026-03-30 21:54:54 +07:00
provider_specs.go Clean architecture refactoring 2025-04-22 14:15:03 +02:00
provider_test.go Add comprehensive test coverage for model package 2026-01-09 15:34:31 +07:00
record.go Can add and update records in service 2026-01-09 15:01:51 +07:00
record_test.go Add comprehensive test coverage for model package 2026-01-09 15:34:31 +07:00
resolver.go Replace any types with proper TypeScript types in web API and model files 2026-04-04 22:05:28 +07:00
service.go fix: use validate instead of binding for zero-value fields 2026-04-11 12:25:10 +07:00
service_specs.go Add binding:required tags and narrow input types for API endpoints 2026-04-04 22:05:28 +07:00
service_test.go Add comprehensive test coverage for model package 2026-01-09 15:34:31 +07:00
session.go Add readonly struct tags to immutable model fields 2026-04-04 22:05:28 +07:00
session_test.go Add comprehensive test coverage for model package 2026-01-09 15:34:31 +07:00
tidy.go checkers: store observations as json.RawMessage with cross-checker reuse 2026-04-15 19:30:14 +07:00
user.go model: add UserQuota struct for admin-controlled per-user limits 2026-04-15 19:30:14 +07:00
user_quota.go model: add UserQuota struct for admin-controlled per-user limits 2026-04-15 19:30:14 +07:00
user_quota_test.go model: add UserQuota struct for admin-controlled per-user limits 2026-04-15 19:30:14 +07:00
user_test.go Add comprehensive test coverage for model package 2026-01-09 15:34:31 +07:00
userclaim.go Add format:"date-time" struct tags to time.Time model fields 2026-04-04 22:05:28 +07:00
userinfo.go Clean architecture refactoring 2025-04-22 14:15:03 +02:00
userregistration.go Add CAPTCHA support for login and registration 2026-02-13 11:31:37 +07:00
usersettings.go Fix Swagger annotations in controllers 2026-04-04 22:05:28 +07:00
userspecialaction.go Refactor auth_user usecase: split in multiple files 2025-05-28 23:02:22 +02:00
version.go Add binding:required tags and narrow input types for API endpoints 2026-04-04 22:05:28 +07:00
zone.go checkers: add API controllers, routes, and app wiring 2026-04-15 19:30:14 +07:00
zone_service.go Refactor domain/provider/zone usecase: split in multiple files 2025-05-28 23:02:22 +02:00
zone_test.go refactor: decompose Analyzer into recordPool and serviceAccumulator 2026-03-14 11:06:49 +07:00