Skip to content

SS-890: Feat: setup user endpoints and data models #18

Merged
HemanthKona merged 19 commits intomainfrom
feat/setup-user-endpoints
Mar 13, 2026
Merged

SS-890: Feat: setup user endpoints and data models #18
HemanthKona merged 19 commits intomainfrom
feat/setup-user-endpoints

Conversation

@HemanthKona
Copy link
Collaborator

@HemanthKona HemanthKona commented Feb 27, 2026

Pull Request for JIRA Ticket: ----SS-890----

Issue ticket number and link

https://jira.justice.gov.bc.ca/browse/SS-890

Description

feat: setup users endpoints crud endpoints with database operations

  • Setup database migration services
  • Setup Database Context
  • Setup IdesignTimeContextFactory to run the migration locally using dotnet ef migrations
  • Setup UserEntity model
  • Generate Migrations for creating User table
  • Setup DTO for Create, Update, Request and Response
  • Setup BadgeNumber field and only search on it based on feature flag
  • Setup feature flags using IOptions pattern

feat: setup global error handling

  • enable problem details
  • organize program.cs file

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • UserControllerTest.cs
  • UserServiceTest.cs

Test Configuration:
If applicable

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Documentation References

Put any doc references here

- regenerate typescript data models from openapi
- enable problem details
- organize program.cs file
- Setup database migration services
- Setup Database Context
- Setup IdesignTimeContextFactory to run the migration locally using `dotnet ef migrations `
- Setup UserEntity model
- Geenrate Migrations for creating User table
- Setup DTO for Create, Update, Request and Response

- Add EntityFramework.InMemory package for running isolated database tests
@HemanthKona HemanthKona changed the title Feat/setup user endpoints Feat: setup user endpoints and data models Mar 5, 2026
…tion service

- Move auth EF models, context, configuration, factory, and migrations into new root-level `db` project
- Rename `AuthDbContext` to `UnifiedDbContext` and update all references in API and tests
- Replace extension-based migration startup with `MigrationAndSeedService`
- Wire migration service in `Unified.Api/Program.cs`
- Add `db` project references to solution and dependent projects (`Unified.Auth`, `Unified.Tests`)
- Update CI/docker config to include `db/**`
- Setup FeatureFlags using IOptions pattern
- Add genereic RequiredBoolean validator for  IOptions
- Ad Create, Update, Response User Dtos
- Add BaseEntity from Sheriff Scheduling
- Add Gender Enum
- Add User entity in db Models UserManagement
@HemanthKona HemanthKona changed the title Feat: setup user endpoints and data models SS-890: Feat: setup user endpoints and data models Mar 12, 2026
@HemanthKona HemanthKona marked this pull request as ready for review March 12, 2026 14:44
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NO ACTION:
One small caveat on this one, we made have some incoming changes related to the conventions document we're discussing under the stats Module.

https://wiki.justice.gov.bc.ca/wiki/spaces/CSA/pages/415203380/BC+Stats

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noted 📓

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this 👍

Copy link
Collaborator

@BronzBierd BronzBierd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this one.

@HemanthKona HemanthKona merged commit 8a37cf8 into main Mar 13, 2026
7 checks passed
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.

3 participants