refactor: contain backend feature mappings
Some checks failed
Backend CI/CD / build_and_deploy (push) Has been cancelled
Frontend CI/CD / build_and_deploy (push) Has been cancelled

This commit is contained in:
2026-04-25 01:14:01 -04:00
parent 121757546a
commit 20f8a14bfb
10 changed files with 308 additions and 190 deletions

View File

@@ -0,0 +1,37 @@
# Task: Contain backend feature mapping
## Feature
`docs/FEATURES/platform-scaffold.md`
## Goal
Move backend feature-specific persistence mapping out of the shared `AppDbContext` body and into the owning `Modules/<Feature>/Data` folders.
## Context
Architecture docs state that current backend feature code stays under `Modules/<Feature>`. `AppDbContext` remains the shared EF Core composition point, but feature-owned model configuration should live with the feature entities.
## Files Likely To Change
- `backend/src/Socialize.Api/Data/AppDbContext.cs`
- `backend/src/Socialize.Api/Modules/*/Data/*`
## Constraints
- Do not change API contracts.
- Do not change table names, indexes, or column constraints.
- Do not introduce a broader persistence refactor.
## Done When
- [x] Feature entity mappings live under the owning module folders.
- [x] `AppDbContext` delegates feature configuration to modules.
- [x] Backend build passes.
## Validation Commands
```bash
dotnet build backend/Socialize.slnx
dotnet test backend/Socialize.slnx
```