Files
orion/app/modules/cms/models/__init__.py
Samir Boulahtit 39dff4ab7d refactor: fix architecture violations with provider patterns and dependency inversion
Major changes:
- Add AuditProvider protocol for cross-module audit logging
- Move customer order operations to orders module (dependency inversion)
- Add customer order metrics via MetricsProvider pattern
- Fix missing db parameter in get_admin_context() calls
- Move ProductMedia relationship to catalog module (proper ownership)
- Add marketplace breakdown stats to marketplace_widgets

New files:
- contracts/audit.py - AuditProviderProtocol
- core/services/audit_aggregator.py - Aggregates audit providers
- monitoring/services/audit_provider.py - Monitoring audit implementation
- orders/services/customer_order_service.py - Customer order operations
- orders/routes/api/vendor_customer_orders.py - Customer order endpoints
- catalog/services/product_media_service.py - Product media service
- Architecture documentation for patterns

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 21:32:32 +01:00

27 lines
802 B
Python

# app/modules/cms/models/__init__.py
"""
CMS module database models.
This is the canonical location for CMS models including:
- ContentPage: CMS pages (marketing, vendor default pages)
- MediaFile: Vendor media library (generic, consumer-agnostic)
- VendorTheme: Vendor storefront theme configuration
Usage:
from app.modules.cms.models import ContentPage, MediaFile, VendorTheme
Note: ProductMedia is in the catalog module since it's catalog's association
to media files. CMS provides generic media storage, consumers define their
own associations.
"""
from app.modules.cms.models.content_page import ContentPage
from app.modules.cms.models.media import MediaFile
from app.modules.cms.models.vendor_theme import VendorTheme
__all__ = [
"ContentPage",
"MediaFile",
"VendorTheme",
]