@eggjs/dal-decorator
Version:
tegg dal decorator
35 lines (34 loc) • 1.05 kB
TypeScript
import type { ColumnFormat, ColumnParams, ColumnTypeParams } from '@eggjs/tegg-types';
export declare class ColumnModel {
columnName: string;
propertyName: string;
type: ColumnTypeParams;
canNull: boolean;
default?: string;
comment?: string;
visible?: boolean;
autoIncrement?: boolean;
uniqueKey?: boolean;
primaryKey?: boolean;
collate?: string;
columnFormat?: ColumnFormat;
engineAttribute?: string;
secondaryEngineAttribute?: string;
constructor(params: {
columnName: string;
propertyName: string;
type: ColumnTypeParams;
canNull: boolean;
default?: string;
comment?: string;
visible?: boolean;
autoIncrement?: boolean;
uniqueKey?: boolean;
primaryKey?: boolean;
collate?: string;
columnFormat?: ColumnFormat;
engineAttribute?: string;
secondaryEngineAttribute?: string;
});
static build(property: string, type: ColumnTypeParams, params?: ColumnParams): ColumnModel;
}