feat(l1): create internal_tickets table with RLS

Tenant-scoped fallback ticket model for accounts without PSA integration.
Tracks customer-name, problem-statement, status lifecycle (open/walking/
resolved/escalated), and optional links to flow/proposal/ai_session/
assigned engineer + PSA promotion ID. Account-scoped RLS policy uses
app.current_account_id session setting.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-28 12:30:51 -04:00
parent c576c6609e
commit 394f729595
3 changed files with 198 additions and 0 deletions

View File

@@ -66,6 +66,7 @@ from .oauth_identity import OAuthIdentity # noqa: F401
from .plan_billing import PlanBilling # noqa: F401
from .sales_lead import SalesLead # noqa: F401
from .stripe_event import StripeEvent # noqa: F401
from .internal_ticket import InternalTicket # noqa: F401
__all__ = [
"User",
@@ -146,4 +147,5 @@ __all__ = [
"PlanBilling",
"SalesLead",
"StripeEvent",
"InternalTicket",
]