refactor: migrate Feature to billing module and split ProductMedia to catalog

- Move Feature model from models/database/ to app/modules/billing/models/
  (tightly coupled to SubscriptionTier for tier-based access control)
- Move ProductMedia from models/database/media.py to app/modules/catalog/models/
  (product-specific media associations belong with catalog)
- Keep MediaFile as CORE in models/database/media.py (cross-cutting file storage)
- Convert legacy feature.py to re-export for backwards compatibility
- Update all imports to use canonical module locations

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-30 19:32:38 +01:00
parent b9f08b853f
commit 0f9b80c634
15 changed files with 336 additions and 268 deletions

View File

@@ -11,6 +11,8 @@ Usage:
SubscriptionTier,
SubscriptionStatus,
TierCode,
Feature,
FeatureCode,
)
"""
@@ -31,14 +33,23 @@ from app.modules.billing.models.subscription import (
# Legacy constants
TIER_LIMITS,
)
from app.modules.billing.models.feature import (
# Enums
FeatureCategory,
FeatureUILocation,
# Model
Feature,
# Constants
FeatureCode,
)
__all__ = [
# Enums
# Subscription Enums
"TierCode",
"SubscriptionStatus",
"AddOnCategory",
"BillingPeriod",
# Models
# Subscription Models
"SubscriptionTier",
"AddOnProduct",
"VendorAddOn",
@@ -48,4 +59,11 @@ __all__ = [
"CapacitySnapshot",
# Legacy constants
"TIER_LIMITS",
# Feature Enums
"FeatureCategory",
"FeatureUILocation",
# Feature Model
"Feature",
# Feature Constants
"FeatureCode",
]