Files
orion/app/modules/loyalty/tasks/__init__.py
Samir Boulahtit 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

20 lines
489 B
Python

# app/modules/loyalty/tasks/__init__.py
"""
Loyalty module Celery tasks.
Background tasks for:
- Point expiration (daily at 02:00)
- Wallet synchronization (hourly)
Task registration is handled by the module definition in definition.py
which specifies the task paths and schedules.
"""
from app.modules.loyalty.tasks.point_expiration import expire_points
from app.modules.loyalty.tasks.wallet_sync import sync_wallet_passes
__all__ = [
"expire_points",
"sync_wallet_passes",
]