mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-09-30 21:13:12 +00:00
36 lines
857 B
Markdown
36 lines
857 B
Markdown
# RowVersion Multi-Agregado — Design
|
|
|
|
**Fase:** 0 — Gate #9
|
|
|
|
---
|
|
|
|
## Agregados
|
|
|
|
| Agregado | Coluna | Comportamento |
|
|
|----------|--------|---------------|
|
|
| WorkOrder | `RowVersion` rowversion | Bump em mutação WO (schedule, status, assignment) |
|
|
| Dispatch | `RowVersion` rowversion | Bump em mutação vendor/checklist/signoff |
|
|
|
|
---
|
|
|
|
## HTTP 409
|
|
|
|
`ConcurrencyExceptionFilter` captura `DbUpdateConcurrencyException` e retorna:
|
|
|
|
```json
|
|
{
|
|
"status": "Conflict",
|
|
"message": "The record was modified by another user. Refresh and retry.",
|
|
"code": 409
|
|
}
|
|
```
|
|
|
|
---
|
|
|
|
## Regras (Fase 2 testes completos)
|
|
|
|
- SHOC edita ScheduledDate → bump WO.RowVersion
|
|
- SHOC edita vendor → bump Dispatch.RowVersion
|
|
- Vendor edita checklist → bump Dispatch.RowVersion only
|
|
|
|
Testes de concorrência paralela: Fase 2 (`Concurrency integration tests` backlog #27).
|