feat: implement user defaults persistence (Step 9.3)

Add user_defaults table and repository for persisting form defaults
across sessions. Feed and egg forms now load/save user preferences.

Changes:
- Add migration 0009-user-defaults.sql with table schema
- Add UserDefault model and UserDefaultsRepository
- Integrate defaults into feed route (location, feed_type, amount)
- Integrate defaults into egg route (location)
- Add repository unit tests and route integration tests

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-31 14:35:27 +00:00
parent d89c46ab51
commit 719d1e6ce7
9 changed files with 566 additions and 6 deletions

12
PLAN.md
View File

@@ -359,12 +359,12 @@ Check off items as completed. Each phase builds on the previous.
- [x] Write tests: sale creates event, unit price calculated
- [x] **Commit checkpoint**: 0eef3ed
### Step 9.3: User Defaults
- [ ] Create migration for user_defaults table
- [ ] Create `repositories/user_defaults.py`
- [ ] Integrate defaults into form rendering
- [ ] Write tests: defaults saved and loaded
- [ ] **Commit checkpoint**
### Step 9.3: User Defaults
- [x] Create migration for user_defaults table
- [x] Create `repositories/user_defaults.py`
- [x] Integrate defaults into form rendering
- [x] Write tests: defaults saved and loaded
- [x] **Commit checkpoint**
---