- Add database migrations for translation tables and digital product fields - Create MarketplaceProductTranslation model for localized content - Create ProductTranslation model for vendor translation overrides - Add product type enum (physical, digital, service, subscription) - Add digital delivery method and platform fields - Add numeric price fields (price_numeric, sale_price_numeric) - Implement language fallback pattern (requested -> 'en' -> None) - Add helper methods: get_title(), get_description(), get_translation() - Add vendor override pattern with effective_* properties - Move title/description from products to translations table 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
81 lines
1.8 KiB
Python
81 lines
1.8 KiB
Python
# models/database/__init__.py
|
|
"""Database models package."""
|
|
|
|
from .admin import (
|
|
AdminAuditLog,
|
|
AdminNotification,
|
|
AdminSession,
|
|
AdminSetting,
|
|
PlatformAlert,
|
|
)
|
|
from .architecture_scan import (
|
|
ArchitectureScan,
|
|
ArchitectureViolation,
|
|
ViolationAssignment,
|
|
ViolationComment,
|
|
)
|
|
from .base import Base
|
|
from .company import Company
|
|
from .content_page import ContentPage
|
|
from .customer import Customer, CustomerAddress
|
|
from .inventory import Inventory
|
|
from .marketplace_import_job import MarketplaceImportJob
|
|
from .marketplace_product import (
|
|
DigitalDeliveryMethod,
|
|
MarketplaceProduct,
|
|
ProductType,
|
|
)
|
|
from .marketplace_product_translation import MarketplaceProductTranslation
|
|
from .order import Order, OrderItem
|
|
from .product import Product
|
|
from .product_translation import ProductTranslation
|
|
from .user import User
|
|
from .vendor import Role, Vendor, VendorUser
|
|
from .vendor_domain import VendorDomain
|
|
from .vendor_theme import VendorTheme
|
|
|
|
__all__ = [
|
|
# Admin-specific models
|
|
"AdminAuditLog",
|
|
"AdminNotification",
|
|
"AdminSetting",
|
|
"PlatformAlert",
|
|
"AdminSession",
|
|
# Architecture/Code Quality
|
|
"ArchitectureScan",
|
|
"ArchitectureViolation",
|
|
"ViolationAssignment",
|
|
"ViolationComment",
|
|
# Base
|
|
"Base",
|
|
# User & Auth
|
|
"User",
|
|
# Company & Vendor
|
|
"Company",
|
|
"Vendor",
|
|
"VendorUser",
|
|
"Role",
|
|
"VendorDomain",
|
|
"VendorTheme",
|
|
# Content
|
|
"ContentPage",
|
|
# Customer
|
|
"Customer",
|
|
"CustomerAddress",
|
|
# Product - Enums
|
|
"ProductType",
|
|
"DigitalDeliveryMethod",
|
|
# Product - Models
|
|
"MarketplaceProduct",
|
|
"MarketplaceProductTranslation",
|
|
"Product",
|
|
"ProductTranslation",
|
|
# Import
|
|
"MarketplaceImportJob",
|
|
# Inventory
|
|
"Inventory",
|
|
# Orders
|
|
"Order",
|
|
"OrderItem",
|
|
]
|