Kaizen
Browse modulesTenancyInterfaces

Interface: TenantTransactionConfig

Defined in: server/tenancy/client.ts:25

Per-consumer tenancy wiring. The consumer supplies these once (schema-specific names + the list of tenant-scoped models); the module is otherwise generic.

  • tenantColumn — the Prisma field (camelCase, e.g. "organizationId") the app-layer belt injects into read wheres. Distinct from RlsConfig.tenantDbColumn — the underlying DB column (snake_case, "organization_id") the RLS policies key on. They are the same logical column named at two layers; wire both to match your schema.
  • models — the tenant-scoped Prisma schema model names (PascalCase, e.g. "Permit"). Must match what $allOperations receives — not the camelCase client delegate (prisma.permit). Same convention as withAudit's AUDIT_FIELDS_BY_MODEL keys ("Rules", "Organization", …).
  • currentTenantGuc / publicReadGuc — the Postgres GUCs the RLS policies read (e.g. "app.current_org" / "app.public_read").

Extended by

Properties

currentTenantGuc

readonly currentTenantGuc: string;

Defined in: server/tenancy/client.ts:26


publicReadGuc

readonly publicReadGuc: string;

Defined in: server/tenancy/client.ts:27


resolveBinding?

readonly optional resolveBinding?: () => TenantBinding | undefined;

Defined in: server/tenancy/client.ts:28

Returns

TenantBinding | undefined

On this page