refactor: update module imports to use module locations

Update all module files to import from canonical module locations
instead of legacy re-export files:
- checkout, orders, customers routes: use module schemas
- catalog, marketplace schemas: use inventory module schemas
- marketplace, customers, inventory, analytics services: use module models

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-30 08:35:01 +01:00
parent 88a4184564
commit d48dc85d5f
72 changed files with 69 additions and 13 deletions

View File

@@ -20,10 +20,10 @@ from sqlalchemy.orm import Session
from app.exceptions import AdminOperationException, VendorNotFoundException
from app.modules.customers.models.customer import Customer
from models.database.inventory import Inventory
from app.modules.inventory.models import Inventory
from models.database.marketplace_import_job import MarketplaceImportJob
from models.database.marketplace_product import MarketplaceProduct
from models.database.order import Order
from app.modules.orders.models import Order
from models.database.product import Product
from models.database.user import User
from models.database.vendor import Vendor

View File

View File

@@ -10,7 +10,7 @@ from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field
from models.schema.inventory import InventoryLocationResponse
from app.modules.inventory.schemas import InventoryLocationResponse
from models.schema.marketplace_product import MarketplaceProductResponse

View File

@@ -31,7 +31,7 @@ from app.modules.orders.services import order_service
from app.services.email_service import EmailService
from middleware.vendor_context import require_vendor_context
from models.database.vendor import Vendor
from models.schema.order import OrderCreate, OrderResponse
from app.modules.orders.schemas import OrderCreate, OrderResponse
router = APIRouter()
logger = logging.getLogger(__name__)

View File

@@ -0,0 +1 @@
{}

View File

@@ -0,0 +1 @@
{}

View File

@@ -0,0 +1 @@
{}

View File

@@ -0,0 +1 @@
{}

View File

@@ -38,7 +38,7 @@ from models.schema.auth import (
PasswordResetResponse,
UserLogin,
)
from models.schema.customer import (
from app.modules.customers.schemas import (
CustomerAddressCreate,
CustomerAddressListResponse,
CustomerAddressResponse,

View File

@@ -0,0 +1,4 @@
# Page routes will be added here
# TODO: Add HTML page routes for admin/vendor dashboards
__all__ = []

View File

@@ -329,7 +329,7 @@ class CustomerService:
Raises:
CustomerNotFoundException: If customer not found
"""
from models.database.order import Order
from app.modules.orders.models import Order
# Verify customer belongs to vendor
self.get_customer(db, vendor_id, customer_id)
@@ -365,7 +365,7 @@ class CustomerService:
"""
from sqlalchemy import func
from models.database.order import Order
from app.modules.orders.models import Order
customer = self.get_customer(db, vendor_id, customer_id)

View File

View File

@@ -0,0 +1 @@
{}

View File

@@ -0,0 +1 @@
{}

View File

@@ -0,0 +1 @@
{}

View File

@@ -0,0 +1 @@
{}

View File

@@ -0,0 +1,4 @@
# Page routes will be added here
# TODO: Add HTML page routes for admin/vendor dashboards
__all__ = []

View File

View File

@@ -0,0 +1 @@
{}

View File

@@ -0,0 +1 @@
{}

View File

@@ -0,0 +1 @@
{}

View File

@@ -0,0 +1 @@
{}

View File

@@ -0,0 +1,4 @@
# Routes will be migrated here from legacy locations
# TODO: Move actual route implementations from app/api/v1/
__all__ = []

View File

@@ -0,0 +1,4 @@
# Page routes will be added here
# TODO: Add HTML page routes for admin/vendor dashboards
__all__ = []

View File

@@ -14,7 +14,7 @@ from sqlalchemy.orm import Session
from app.exceptions import OrderNotFoundException, ProductNotFoundException
from app.modules.inventory.models.inventory import Inventory
from app.modules.inventory.models.inventory_transaction import InventoryTransaction
from models.database.order import Order
from app.modules.orders.models import Order
from models.database.product import Product
logger = logging.getLogger(__name__)

View File

View File

View File

@@ -10,7 +10,7 @@ from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field
from models.schema.inventory import ProductInventorySummary
from app.modules.inventory.schemas import ProductInventorySummary
class MarketplaceProductTranslationSchema(BaseModel):

View File

@@ -23,7 +23,7 @@ from models.database.letzshop import (
VendorLetzshopCredentials,
)
from models.database.marketplace_import_job import MarketplaceImportJob
from models.database.order import Order, OrderItem
from app.modules.orders.models import Order, OrderItem
from models.database.product import Product
from models.database.vendor import Vendor

View File

@@ -30,12 +30,12 @@ from app.exceptions import (
ValidationException,
)
from app.utils.data_processing import GTINProcessor, PriceProcessor
from models.database.inventory import Inventory
from app.modules.inventory.models import Inventory
from models.database.marketplace_product import MarketplaceProduct
from models.database.marketplace_product_translation import (
MarketplaceProductTranslation,
)
from models.schema.inventory import InventoryLocationResponse, InventorySummaryResponse
from app.modules.inventory.schemas import InventoryLocationResponse, InventorySummaryResponse
from models.schema.marketplace_product import (
MarketplaceProductCreate,
MarketplaceProductUpdate,

View File

View File

@@ -0,0 +1 @@
{}

View File

@@ -0,0 +1 @@
{}

View File

@@ -0,0 +1 @@
{}

View File

@@ -0,0 +1 @@
{}

View File

@@ -0,0 +1,4 @@
# Page routes will be added here
# TODO: Add HTML page routes for admin/vendor dashboards
__all__ = []

View File

View File

@@ -0,0 +1 @@
{}

View File

@@ -0,0 +1 @@
{}

View File

@@ -0,0 +1 @@
{}

View File

@@ -0,0 +1 @@
{}

View File

@@ -0,0 +1,4 @@
# Routes will be migrated here from legacy locations
# TODO: Move actual route implementations from app/api/v1/
__all__ = []

View File

@@ -0,0 +1,4 @@
# Page routes will be added here
# TODO: Add HTML page routes for admin/vendor dashboards
__all__ = []

View File

View File

@@ -0,0 +1 @@
{}

View File

@@ -0,0 +1 @@
{}

View File

@@ -0,0 +1 @@
{}

View File

@@ -0,0 +1 @@
{}

View File

@@ -25,7 +25,7 @@ from app.exceptions.invoice import InvoicePDFNotFoundException
from app.modules.customers.schemas import CustomerContext
from app.modules.orders.services import order_service
from app.services.invoice_service import invoice_service
from models.schema.order import (
from app.modules.orders.schemas import (
OrderDetailResponse,
OrderListResponse,
OrderResponse,

View File

@@ -0,0 +1,4 @@
# Page routes will be added here
# TODO: Add HTML page routes for admin/vendor dashboards
__all__ = []

View File

View File