import { Scalar, DbType, XRowset, XExpression } from '../../core'; import { DbContext } from '../db-context'; import { Entity } from '../entity'; import { ColumnMetadata } from '../metadata'; import { ContextBuilder } from './context-builder'; import { EntityBuilder } from './entity-builder'; export declare class PropertyBuilder { private readonly contextBuilder; private readonly entityBuilder; readonly metadata: Partial>; constructor(contextBuilder: ContextBuilder, entityBuilder: EntityBuilder, metadata: Partial>); /** * 声明为列 */ hasColumnName(columnName: string): Omit; /** * 数据类型 */ hasType(dbType: DbType): Omit; /** * 列自动填充值,通过表达式生成,如调用函数等 * @param generator * @returns */ isAutogen(generator: (rowset: XRowset, item: T, context: DbContext) => XExpression): this; isNotAutogen(): this; /** * 是否可空 */ isNullable(yesOrNo?: boolean): Omit; isRequired(yesOrNo?: boolean): this; /** * 行标记列,每次更新时自动变换值 * 同时会修改列的类型为DbType.rowflag */ isRowflag(yesOrNo?: boolean): Omit; /** * 标识列 */ isIdentity(seed?: number, step?: number): this; /** * 移除标识列 */ isNotIdentity(): this; /** * 默认值 */ hasDefaultValue(expr: XExpression): this; /** * 移除默认值 */ hasNoDefaultValue(): this; /** * 摘要说明 */ hasComment(comment?: string): Omit; /** * 将列声明为计算列 */ isCalculated(expr: XExpression): this; isNotCalculated(): this; }