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:
@@ -19,7 +19,7 @@ from app.services.code_quality_service import (
|
||||
code_quality_service,
|
||||
)
|
||||
from app.tasks.code_quality_tasks import execute_code_quality_scan
|
||||
from models.database.architecture_scan import ArchitectureScan
|
||||
from app.modules.dev_tools.models import ArchitectureScan
|
||||
from models.database.user import User
|
||||
from app.modules.analytics.schemas import CodeQualityDashboardStatsResponse
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ from app.core.database import get_db
|
||||
from app.services.admin_subscription_service import admin_subscription_service
|
||||
from app.services.subscription_service import subscription_service
|
||||
from models.database.user import User
|
||||
from models.schema.billing import (
|
||||
from app.modules.billing.schemas import (
|
||||
BillingHistoryListResponse,
|
||||
BillingHistoryWithVendor,
|
||||
SubscriptionStatsResponse,
|
||||
|
||||
@@ -22,7 +22,7 @@ from app.core.database import get_db
|
||||
from app.services.subscription_service import subscription_service
|
||||
from app.services.vendor_product_service import vendor_product_service
|
||||
from models.database.user import User
|
||||
from models.schema.vendor_product import (
|
||||
from app.modules.catalog.schemas import (
|
||||
CatalogVendor,
|
||||
CatalogVendorsResponse,
|
||||
RemoveProductResponse,
|
||||
|
||||
@@ -15,7 +15,7 @@ from sqlalchemy.orm import Session
|
||||
from app.core.database import get_db
|
||||
from app.exceptions import ResourceNotFoundException
|
||||
from app.services.platform_pricing_service import platform_pricing_service
|
||||
from models.database.subscription import TierCode
|
||||
from app.modules.billing.models import TierCode
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
@@ -188,7 +188,7 @@ def get_tiers(db: Session = Depends(get_db)) -> list[TierResponse]:
|
||||
return [_tier_to_response(tier, is_from_db=True) for tier in db_tiers]
|
||||
|
||||
# Fallback to hardcoded tiers
|
||||
from models.database.subscription import TIER_LIMITS
|
||||
from app.modules.billing.models import TIER_LIMITS
|
||||
|
||||
tiers = []
|
||||
for tier_code in TIER_LIMITS:
|
||||
|
||||
2
app/api/v1/vendor/products.py
vendored
2
app/api/v1/vendor/products.py
vendored
@@ -26,7 +26,7 @@ from app.modules.catalog.schemas import (
|
||||
ProductToggleResponse,
|
||||
ProductUpdate,
|
||||
)
|
||||
from models.schema.vendor_product import (
|
||||
from app.modules.catalog.schemas import (
|
||||
VendorDirectProductCreate,
|
||||
VendorProductCreateResponse,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user