Files
dzentra_bot/docs/decisions/0011-repositories-before-orders.md

15 lines
743 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 0011 — Repositories before Orders
## Решение
Сначала добавить repository слой для snapshots и drafts, и только потом переходить к order flow.
## Причины
- order flow без repositories быстро приводит к смешению SQL и бизнес-логики
- snapshots баланса — безопасный и полезный use case
- это подготавливает архитектуру к следующим этапам
## Последствия
- storage становится частью бизнес-логики
- Telegram handlers становятся тоньше
- следующий этап с order drafts будет проще и чище