Transition from team-based to account-based multi-tenancy (Free/Pro/Team). Migrations 016-020 create accounts, subscriptions, plan_limits, and account_invites tables, then migrate existing users and content FKs. New models: Account, Subscription, PlanLimits, AccountInvite. Updated models add account_id alongside existing team_id (coexistence for safe two-PR deployment). Permissions and deps refactored for account_role instead of is_team_admin. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
42 lines
1018 B
Python
42 lines
1018 B
Python
from .user import User
|
|
from .team import Team
|
|
from .account import Account
|
|
from .subscription import Subscription
|
|
from .plan_limits import PlanLimits
|
|
from .account_invite import AccountInvite
|
|
from .tree import Tree
|
|
from .session import Session
|
|
from .attachment import Attachment
|
|
from .invite_code import InviteCode
|
|
from .category import TreeCategory
|
|
from .tag import TreeTag, tree_tag_assignments
|
|
from .folder import UserFolder, user_folder_trees
|
|
from .step_category import StepCategory
|
|
from .step_library import StepLibrary, StepRating, StepUsageLog
|
|
from .refresh_token import RefreshToken
|
|
from .audit_log import AuditLog
|
|
|
|
__all__ = [
|
|
"User",
|
|
"Team",
|
|
"Account",
|
|
"Subscription",
|
|
"PlanLimits",
|
|
"AccountInvite",
|
|
"Tree",
|
|
"Session",
|
|
"Attachment",
|
|
"InviteCode",
|
|
"TreeCategory",
|
|
"TreeTag",
|
|
"tree_tag_assignments",
|
|
"UserFolder",
|
|
"user_folder_trees",
|
|
"StepCategory",
|
|
"StepLibrary",
|
|
"StepRating",
|
|
"StepUsageLog",
|
|
"RefreshToken",
|
|
"AuditLog",
|
|
]
|