Migrate analytics module to fully self-contained structure: - routes/api/vendor.py - API endpoints - routes/pages/vendor.py - Page routes with full implementation - services/stats_service.py - Business logic (moved from app/services) - services/usage_service.py - Usage tracking (moved from app/services) - schemas/stats.py - Pydantic schemas (moved from models/schema) - models/__init__.py - Model exports - templates/analytics/vendor/ - Templates (moved from app/templates) - static/vendor/js/ - JavaScript (moved from static/vendor) - locales/ - Translations (en, de, fr, lu) - exceptions.py - Module exceptions Removed legacy files: - app/modules/analytics/routes/vendor.py (replaced by routes/pages/) - static/admin/js/analytics.js (unused) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
35 lines
670 B
Python
35 lines
670 B
Python
# app/modules/analytics/services/__init__.py
|
|
"""
|
|
Analytics module services.
|
|
|
|
This is the canonical location for analytics services.
|
|
"""
|
|
|
|
from app.modules.analytics.services.stats_service import (
|
|
stats_service,
|
|
StatsService,
|
|
)
|
|
from app.modules.analytics.services.usage_service import (
|
|
usage_service,
|
|
UsageService,
|
|
UsageData,
|
|
UsageMetricData,
|
|
TierInfoData,
|
|
UpgradeTierData,
|
|
LimitCheckData,
|
|
)
|
|
|
|
__all__ = [
|
|
# Stats service
|
|
"stats_service",
|
|
"StatsService",
|
|
# Usage service
|
|
"usage_service",
|
|
"UsageService",
|
|
"UsageData",
|
|
"UsageMetricData",
|
|
"TierInfoData",
|
|
"UpgradeTierData",
|
|
"LimitCheckData",
|
|
]
|