UNPKG

@zenweb/tenant

Version:

Zenweb Tenant module

19 lines (18 loc) 545 B
import { SetupFunction } from '@zenweb/core'; import { MySQLOption } from '@zenweb/mysql'; import type { Tenant, TenantOption } from './types.js'; export * from './types.js'; /** * 当前上下文取得的租户信息 */ declare const TENANT: unique symbol; /** * 生成租户数据库配置信息 */ export declare function makeTenantMySQLOption(option: TenantOption): MySQLOption; export default function setup(option: TenantOption): SetupFunction; declare module '@zenweb/core' { interface Context { [TENANT]: Tenant; } }