d8f3338bc8
feat(loyalty): implement Phase 2 - company-wide points system
...
Complete implementation of loyalty module Phase 2 features:
Database & Models:
- Add company_id to LoyaltyProgram for chain-wide loyalty
- Add company_id to LoyaltyCard for multi-location support
- Add CompanyLoyaltySettings model for admin-controlled settings
- Add points expiration, welcome bonus, and minimum redemption fields
- Add POINTS_EXPIRED, WELCOME_BONUS transaction types
Services:
- Update program_service for company-based queries
- Update card_service with enrollment and welcome bonus
- Update points_service with void_points for returns
- Update stamp_service for company context
- Update pin_service for company-wide operations
API Endpoints:
- Admin: Program listing with stats, company detail views
- Vendor: Terminal operations, card management, settings
- Storefront: Customer card/transactions, self-enrollment
UI Templates:
- Admin: Programs dashboard, company detail, settings
- Vendor: Terminal, cards list, card detail, settings, stats, enrollment
- Storefront: Dashboard, history, enrollment, success pages
Background Tasks:
- Point expiration task (daily, based on inactivity)
- Wallet sync task (hourly)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-02-05 22:10:27 +01:00
d48dc85d5f
refactor: update module imports to use module locations
...
Update all module files to import from canonical module locations
instead of legacy re-export files:
- checkout, orders, customers routes: use module schemas
- catalog, marketplace schemas: use inventory module schemas
- marketplace, customers, inventory, analytics services: use module models
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-01-30 08:35:01 +01:00