@eggjs/dal-decorator
Version:
tegg dal decorator
30 lines (29 loc) • 951 B
TypeScript
import { EggProtoImplClass, IndexType } from '@eggjs/tegg-types';
import type { IndexParams, IndexStoreType } from '@eggjs/tegg-types';
import { ColumnModel } from './ColumnModel';
export interface IndexKey {
columnName: string;
propertyName: string;
}
export declare class IndexModel {
name: string;
keys: IndexKey[];
type: IndexType;
storeType?: IndexStoreType;
comment?: string;
engineAttribute?: string;
secondaryEngineAttribute?: string;
parser?: string;
constructor(params: {
name: string;
keys: IndexKey[];
type: IndexType;
storeType?: IndexStoreType;
comment?: string;
engineAttribute?: string;
secondaryEngineAttribute?: string;
parser?: string;
});
static buildIndexName(keys: string[], type: IndexType): string;
static build(params: IndexParams, columns: ColumnModel[], clazz: EggProtoImplClass<unknown>): IndexModel;
}