feat: backend MVP (auth/rbac, catalog, orders, fulfillment, invoices) + specs + scaffolds

This commit is contained in:
Chengdong Zhang
2026-09-17 12:43:22 +08:00
commit dc9fd31c5e
96 changed files with 17550 additions and 0 deletions
@@ -0,0 +1,17 @@
# Proposal: fulfillment-invoices
## Why
After payment, merchants ship goods (发货单) and customers request invoices (发票). This phase closes the post-order loop of the MVP.
## What changes
- Schema: shipments (carrier, tracking, status, per-item qty), invoices (title, tax_no, kind, amount, status).
- Shipment lifecycle: created(pending) → shipped → delivered; order becomes fulfilling on first shipment, shipped when all items shipped, completed when all delivered (customer confirm allowed).
- Merchant APIs: create shipment for paid/fulfilling orders, mark shipped, list shipments/invoices, issue invoice.
- Customer APIs: my shipments, confirm delivery, request invoice per order, my invoices.
## Non-goals
- Carrier API integrations, e-invoice/PDF generation, partial invoice amounts.
## Capabilities
- `shipment`: 发货单 lifecycle.
- `invoice`: 发票 request/issue lifecycle.