feat: add CMS database model and migrations
Implement Content Management System database layer: Database Model: - ContentPage model with two-tier architecture - Platform defaults (vendor_id=NULL) - Vendor-specific overrides (vendor_id=123) - SEO fields (meta_description, meta_keywords) - Publishing workflow (is_published, published_at) - Navigation flags (show_in_footer, show_in_header) - Display ordering and timestamps Migrations: - Create content_pages table with all columns - Add indexes for performance (vendor_id, slug, published status) - Add unique constraint on (vendor_id, slug) - Add foreign key relationships with cascade delete Model Registration: - Add ContentPage to Vendor relationship - Import model in alembic/env.py for migration detection This provides the foundation for managing static content pages (About, FAQ, Contact, etc.) with platform defaults and vendor overrides. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -93,6 +93,16 @@ try:
|
||||
except ImportError as e:
|
||||
print(f" ✗ VendorTheme model failed: {e}")
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# CONTENT PAGE MODEL (CMS)
|
||||
# ----------------------------------------------------------------------------
|
||||
try:
|
||||
from models.database.content_page import ContentPage
|
||||
|
||||
print(" ✓ ContentPage model imported")
|
||||
except ImportError as e:
|
||||
print(f" ✗ ContentPage model failed: {e}")
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# PRODUCT MODELS
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user