refactor: clean up legacy models and migrate remaining schemas

Delete empty stub files from models/database/:
- audit.py, backup.py, configuration.py, monitoring.py
- notification.py, payment.py, search.py, task.py

Delete re-export files:
- models/database/subscription.py → app.modules.billing.models
- models/database/architecture_scan.py → app.modules.dev_tools.models
- models/database/test_run.py → app.modules.dev_tools.models
- models/schema/subscription.py → app.modules.billing.schemas
- models/schema/marketplace.py (empty)
- models/schema/monitoring.py (empty)

Migrate schemas to canonical module locations:
- billing.py → app/modules/billing/schemas/
- vendor_product.py → app/modules/catalog/schemas/
- homepage_sections.py → app/modules/cms/schemas/

Keep as CORE (framework-level, used everywhere):
- models/schema/: admin, auth, base, company, email, image, media, team, vendor*
- models/database/: admin*, base, company, email, feature, media, platform*, user, vendor*

Update 30+ files to use canonical import locations.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-30 18:45:46 +01:00
parent 1ef50893a1
commit b9f08b853f
49 changed files with 152 additions and 220 deletions

View File

@@ -899,7 +899,7 @@ class ContentPageService:
ContentPageNotFoundException: If page not found
ValidationError: If sections schema invalid
"""
from models.schema.homepage_sections import HomepageSections
from app.modules.cms.schemas import HomepageSections
page = ContentPageService.get_page_by_id_or_raise(db, page_id)
@@ -941,7 +941,7 @@ class ContentPageService:
ContentPageNotFoundException: If page not found
ValueError: If section name is invalid
"""
from models.schema.homepage_sections import (
from app.modules.cms.schemas import (
HeroSection,
FeaturesSection,
PricingSection,
@@ -989,7 +989,7 @@ class ContentPageService:
Returns:
Empty sections dict with language placeholders
"""
from models.schema.homepage_sections import HomepageSections
from app.modules.cms.schemas import HomepageSections
if languages is None:
languages = ["fr", "de", "en"]