Files
JQC_multi_tenant/app/tenancy/context.py
T
2026-06-26 16:37:44 -04:00

20 lines
467 B
Python

"""
app/tenancy/context.py
----------------------
Lightweight, detached descriptor for the resolved tenant. Populated by the
resolver while a control-plane session is open, then carried on `g.tenant`
for the lifetime of the request. Holds no live ORM object — safe to use after
the control session closes.
"""
from dataclasses import dataclass
@dataclass(frozen=True)
class TenantContext:
id: int
slug: str
name: str
plan_id: int
db_uri: str