mirror of
https://github.com/azaion/satellite-provider.git
synced 2026-06-22 02:51:14 +00:00
[AZ-284] Autodev baseline + testability refactor
Phase A baseline outputs from /autodev (Steps 1-5): - Problem & solution docs (_docs/00_problem, _docs/01_solution) - Codebase documentation (_docs/02_document) incl. architecture, module-layout, glossary, system-flows, baseline compliance scan - Test specs (blackbox, performance, resilience, security, resource, traceability matrix) - Test task decomposition (_docs/02_tasks/todo): AZ-285..AZ-290 - Testability refactor (_docs/04_refactoring/01-testability-refactoring): - TC-01 Move DownloadedTileInfoV2 + new ExistingTileInfo to Common.DTO - TC-02 Replace dead ISatelliteDownloader API with real signatures - TC-03 GoogleMapsDownloaderV2 implements ISatelliteDownloader - TC-04 TileService depends on ISatelliteDownloader (mockable) - TC-05 DI + endpoints use ISatelliteDownloader - Test runner scripts (scripts/run-tests.sh, run-performance-tests.sh) - Autodev state pointer (_docs/_autodev_state.md) Prepares the codebase for AZ-285..AZ-290 unit/integration test work. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
# Module: DataAccess/Repositories/RegionRepository
|
||||
|
||||
## Purpose
|
||||
Dapper-based repository for the `regions` table. Tracks region processing requests and their status lifecycle.
|
||||
|
||||
## Public Interface
|
||||
|
||||
### IRegionRepository (interface)
|
||||
- `GetByIdAsync(Guid id) → Task<RegionEntity?>`
|
||||
- `GetByStatusAsync(string status) → Task<IEnumerable<RegionEntity>>`: retrieves all regions with a given status, ordered by creation date ASC
|
||||
- `InsertAsync(RegionEntity region) → Task<Guid>`
|
||||
- `UpdateAsync(RegionEntity region) → Task<int>`
|
||||
- `DeleteAsync(Guid id) → Task<int>`
|
||||
|
||||
### RegionRepository (implementation)
|
||||
Same connection-per-call pattern as TileRepository.
|
||||
|
||||
## Internal Logic
|
||||
Standard CRUD. `GetByStatusAsync` orders by `created_at ASC` to process oldest requests first.
|
||||
|
||||
## Dependencies
|
||||
- NuGet: `Dapper`, `Npgsql`
|
||||
- `SatelliteProvider.DataAccess.Models.RegionEntity`
|
||||
- `Microsoft.Extensions.Logging`
|
||||
|
||||
## Consumers
|
||||
- `RegionService` — insert on request, update during processing
|
||||
- `RouteProcessingService` — reads region records to check status and get CSV paths
|
||||
|
||||
## Data Models
|
||||
Operates on `RegionEntity`.
|
||||
|
||||
## Configuration
|
||||
Connection string via constructor.
|
||||
|
||||
## External Integrations
|
||||
PostgreSQL.
|
||||
|
||||
## Security
|
||||
None.
|
||||
|
||||
## Tests
|
||||
No dedicated tests.
|
||||
Reference in New Issue
Block a user