Files
saas_backend/app/models/__init__.py
T
2026-08-31 20:04:12 -04:00

79 lines
3.2 KiB
Python

"""Every model, in one import.
`Base.metadata` only knows about a model once its module has been imported.
Nothing had imported them all in one place, so anything wanting the whole schema
— `create_all`, a scratch database, a tool reading the metadata — had to list
twenty modules and stay in step with them.
Importing here is a side effect on purpose. The names are re-exported so the
import is not mistaken for dead code and removed.
"""
from app.models.auth.access_model import Access
from app.models.auth.identity_model import (
IdentityProvider,
SsoLoginState,
UserIdentity,
)
from app.models.auth.module_access_model import ModuleAccess
from app.models.auth.module_environment_model import ModuleEnvironment
from app.models.auth.module_model import Module
from app.models.auth.plan_access_model import PlanAccess
from app.models.auth.plan_module_access_model import PlanModuleAccess
from app.models.auth.role_access_model import RoleAccess
from app.models.auth.role_model import Role
from app.models.auth.role_module_access_model import RoleModuleAccess
from app.models.auth.sso_grant_model import SSOGrant
from app.models.auth.subscription_plan_model import SubscriptionPlan
from app.models.auth.tenant_model import Tenant
from app.models.auth.tenant_module_model import TenantModule
from app.models.auth.user_model import User
from app.models.system.alert_state_model import AlertState
from app.models.system.audit_log import AuditLog
from app.models.system.event_log_model import EventLog
from app.models.auth.api_key_model import ApiKey # noqa: F401
from app.models.auth.seat_allocation_model import OrgUnitSeatAllocation # noqa: F401
from app.models.auth.org_unit_model import OrgUnit, UserAdminScope, UserOrgUnit # noqa: F401
from app.models.auth.invitation_model import UserInvitation # noqa: F401
from app.models.system.idempotency_model import IdempotencyRecord # noqa: F401
from app.models.system.notification_preference_model import NotificationPreference # noqa: F401
from app.models.system.notification_model import Notification # noqa: F401
from app.models.system.tenant_email_model import TenantEmailSettings # noqa: F401
from app.models.system.document_model import Document # noqa: F401
from app.models.system.lookup_model import LookupItem, LookupList # noqa: F401
from app.models.system.webhook_model import WebhookDelivery, WebhookEndpoint # noqa: F401
from app.models.system.mfa_model import MfaRecoveryCode, UserMfa
from app.models.system.subscription_history_model import TenantSubscriptionHistory
from app.models.system.subscription_notice_model import SubscriptionNotice
from app.models.system.user_session_model import UserSession
from app.models.theme.color_palette_model import ColorPalette
__all__ = [
"Access",
"AlertState",
"AuditLog",
"ColorPalette",
"EventLog",
"IdentityProvider",
"MfaRecoveryCode",
"Module",
"ModuleAccess",
"ModuleEnvironment",
"PlanAccess",
"PlanModuleAccess",
"Role",
"RoleAccess",
"RoleModuleAccess",
"SSOGrant",
"SubscriptionNotice",
"SsoLoginState",
"SubscriptionPlan",
"Tenant",
"TenantModule",
"TenantSubscriptionHistory",
"User",
"UserIdentity",
"UserMfa",
"UserSession",
]