feat: add product sold event handling
Add sell_product() service method that creates ProductSold events with calculated unit_price_cents (floor division of total/qty). Update ProductsProjection to handle PRODUCT_SOLD events. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
10
PLAN.md
10
PLAN.md
@@ -179,11 +179,11 @@ Check off items as completed. Each phase builds on the previous.
|
||||
- [x] **Commit checkpoint** (c08fa47)
|
||||
|
||||
### Step 4.5: Product Sold Event
|
||||
- [ ] Implement apply_product_sold projection
|
||||
- [ ] Add sell_product to services/products.py
|
||||
- [ ] Calculate unit_price_cents = floor(total/qty)
|
||||
- [ ] Write tests: event stored, unit price calculated
|
||||
- [ ] **Commit checkpoint**
|
||||
- [x] Implement apply_product_sold projection
|
||||
- [x] Add sell_product to services/products.py
|
||||
- [x] Calculate unit_price_cents = floor(total/qty)
|
||||
- [x] Write tests: event stored, unit price calculated
|
||||
- [x] **Commit checkpoint**
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user