import { EntityConstructor, Entity } from '../entity'; import { XExpression, DbType, XRowset } from '../../core'; import { ColumnMetadata } from '../metadata'; import { ScalarDataType } from '../data-types'; import { DbContext } from '../db-context'; import 'reflect-metadata'; export interface ColumnOptions extends Partial> { type: ScalarDataType; defaultValueGetter?: () => XExpression; calculateExpressionGetter?: () => XExpression; } export declare function getColumnOptions(target: EntityConstructor, key: string): ColumnOptions | undefined; export declare function column(name?: string): PropertyDecorator; export declare function column(type: ScalarDataType): PropertyDecorator; export declare function column(dbType: DbType): PropertyDecorator; export declare function column(type: ScalarDataType, dbType: DbType): PropertyDecorator; export declare function column(name: string, type?: ScalarDataType): PropertyDecorator; export declare function column(name: string, dbType?: DbType): PropertyDecorator; export declare function column(name: string, type: ScalarDataType, dbType: DbType): PropertyDecorator; export declare function rowflag(yesOrNo?: boolean): PropertyDecorator; export declare function nullable(yesOrNo?: boolean): PropertyDecorator; export declare function calculate(exprGetter: () => XExpression): PropertyDecorator; export declare function noCalculate(): PropertyDecorator; export declare function autogen(generator: (rowset: XRowset, item: object, context: DbContext) => XExpression): PropertyDecorator; /** * 移除自动生成 */ export declare function noAutogen(): PropertyDecorator; export declare function defaultValue(exprGetter: () => XExpression): PropertyDecorator; export declare function noDefaultValue(): PropertyDecorator; /** * 单独标记属性类型 * Uuid Decimal Date等对象类型必须使用type进行标记 */ export declare function type(type: ScalarDataType): PropertyDecorator; export declare function identity(start?: number, incerment?: number): PropertyDecorator;