- Update Order model with customer/address snapshot fields - Add external marketplace references (external_order_id, external_shipment_id) - Add tracking_provider field for shipping carriers - Add order_date, confirmed_at timestamps - Update OrderItem with gtin/gtin_type, external_item_id, item_state - Remove LetzshopOrder model (orders now go to unified table) - Update LetzshopFulfillmentQueue to reference orders.id Design decision: Single orders table for all channels with snapshotted data preserved at order time for historical accuracy. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
98 lines
2.3 KiB
Python
98 lines
2.3 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 .letzshop import (
|
|
LetzshopFulfillmentQueue,
|
|
LetzshopHistoricalImportJob,
|
|
LetzshopSyncLog,
|
|
VendorLetzshopCredentials,
|
|
)
|
|
from .marketplace_import_job import MarketplaceImportError, 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 .test_run import TestCollection, TestResult, TestRun
|
|
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",
|
|
# Test Runs
|
|
"TestRun",
|
|
"TestResult",
|
|
"TestCollection",
|
|
# 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",
|
|
"MarketplaceImportError",
|
|
# Inventory
|
|
"Inventory",
|
|
# Orders
|
|
"Order",
|
|
"OrderItem",
|
|
# Letzshop Integration
|
|
"VendorLetzshopCredentials",
|
|
"LetzshopFulfillmentQueue",
|
|
"LetzshopSyncLog",
|
|
"LetzshopHistoricalImportJob",
|
|
]
|