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:
@@ -15,7 +15,7 @@ from app.services.billing_service import (
|
||||
SubscriptionNotCancelledError,
|
||||
TierNotFoundError,
|
||||
)
|
||||
from models.database.subscription import (
|
||||
from app.modules.billing.models import (
|
||||
AddOnProduct,
|
||||
BillingHistory,
|
||||
SubscriptionStatus,
|
||||
|
||||
@@ -20,7 +20,7 @@ from app.services.capacity_forecast_service import (
|
||||
CapacityForecastService,
|
||||
capacity_forecast_service,
|
||||
)
|
||||
from models.database.subscription import CapacitySnapshot
|
||||
from app.modules.billing.models import CapacitySnapshot
|
||||
|
||||
|
||||
@pytest.mark.unit
|
||||
|
||||
@@ -6,7 +6,7 @@ import pytest
|
||||
from app.exceptions import FeatureNotFoundError, InvalidFeatureCodesError, TierNotFoundError
|
||||
from app.services.feature_service import FeatureService, feature_service
|
||||
from models.database.feature import Feature
|
||||
from models.database.subscription import SubscriptionTier, VendorSubscription
|
||||
from app.modules.billing.models import SubscriptionTier, VendorSubscription
|
||||
|
||||
|
||||
@pytest.mark.unit
|
||||
|
||||
@@ -7,7 +7,7 @@ from unittest.mock import MagicMock, patch
|
||||
import pytest
|
||||
|
||||
from app.handlers.stripe_webhook import StripeWebhookHandler
|
||||
from models.database.subscription import (
|
||||
from app.modules.billing.models import (
|
||||
BillingHistory,
|
||||
StripeWebhookEvent,
|
||||
SubscriptionStatus,
|
||||
|
||||
@@ -5,7 +5,7 @@ import pytest
|
||||
|
||||
from app.services.usage_service import UsageService, usage_service
|
||||
from app.modules.catalog.models import Product
|
||||
from models.database.subscription import SubscriptionTier, VendorSubscription
|
||||
from app.modules.billing.models import SubscriptionTier, VendorSubscription
|
||||
from models.database.vendor import VendorUser
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user