@eggjs/tegg-types
Version:
tegg types
31 lines (30 loc) • 851 B
TypeScript
export interface AttributeOptions {
name?: string;
allowNull?: boolean;
autoIncrement?: boolean;
primary?: boolean;
unique?: boolean;
}
export interface IndexOptions {
unique?: boolean;
primary?: boolean;
name?: string;
}
export interface ModelParams {
tableName?: string;
dataSource?: string;
}
export interface ModelIndexInfo {
fields: string[];
options?: IndexOptions;
}
export interface ModelAttributeInfo {
dataType: string;
options?: AttributeOptions;
}
export declare const MODEL_PROTO_IMPL_TYPE = "MODEL_PROTO";
export declare const IS_MODEL: unique symbol;
export declare const MODEL_DATA_SOURCE: unique symbol;
export declare const MODEL_DATA_TABLE_NAME: unique symbol;
export declare const MODEL_DATA_INDICES: unique symbol;
export declare const MODEL_DATA_ATTRIBUTES: unique symbol;