@zenweb/repositories
Version:
Zenweb ORM Repositories module
32 lines (31 loc) • 875 B
TypeScript
import { Context } from '@zenweb/core';
import { QueryParam } from 'zenorm';
export interface RepositoriesOption {
/**
* 在 `Core` 中挂载 `Repositories` 对象
*/
coreQuery?: () => QueryParam;
/**
* 在 `Context` 中挂载 `Repositories` 对象
* - 需要数据库模块的 `withContext` 支持
*/
contextQuery?: (ctx: Context) => QueryParam;
/**
* 挂载到 `Core` 中的属性名
* - `coreQuery` 有效的情况下使用
* @default 'repositories'
*/
coreProperty?: string;
/**
* 挂载到 `Context` 中的属性名
* - `contextQuery` 有效的情况下使用
* @default 'repositories'
*/
contextProperty?: string;
/**
* zenorm 生成的 Repositories class
*/
Repositories: {
new (query: QueryParam): void;
};
}