A2: lottery models and database constraints (WEB-04, ADR-10, ADR-15, ADR-22, DAT-76..79, AUD-47)
LotteryConfig (single row, parameters and the three pause switches), Round (single active round, own rules, split within the pool), Participation (one bet per player and round, unique draw position), Movement (signed ledger, idempotency key per player), ChainTransaction and an append-only AuditEntry enforced by the model and by SQLite triggers. Every foreign key is PROTECT. One test per constraint, each checked to hit the intended constraint. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
fc23a75c9b
commit
0eba7bcfe6
12 files changed
+1139
-4
No files matched your search
@@ -37,6 +37,8 @@ backend FastAPI (vedi [architettura.md](architettura.md)).
|
||||
- **[WEB-04]** Importi e saldi si rappresentano in unità minime intere
|
||||
([ADR-35](adr/ADR-35-aritmetica-satoshi-interi.md)); i parametri economici e
|
||||
temporali del round sono fissati alla sua apertura ([ADR-10](adr/ADR-10-parametri-round-fotografati-all-apertura.md)).
|
||||
*Stato:* colonne e vincoli implementati (A2, [DAT-76]…[DAT-78]); la copia all'apertura con A4 ·
|
||||
*Test:* `tests/django/test_models.py::test_amounts_are_integers_only`
|
||||
- **[WEB-05]** I dati che cambiano (stato del round, saldo, esito) si
|
||||
aggiornano con richieste periodiche mirate e si recuperano al rientro nella
|
||||
pagina; ricaricare non perde lo stato salvato.
|
||||
|
||||
Reference in new issue
Block a user