ts-db-helper
Version:
Simple ORM based on TypeScript
42 lines (41 loc) • 1.3 kB
TypeScript
/**
* @class ColumnConfig
*
* @description
* specific configurator for {@link Column} annotation
*
* @author Olivier Margarit
* @since 0.1
*/
export declare class ColumnConfig {
/**
* @property {string} name, the optional column name, if not set, the column take
* the field name as column name
*/
name?: string;
/**
* @property {boolean} primaryKey, define the column as primary key of the table,
* the default value is false
*/
primaryKey?: boolean | undefined;
/**
* @property {boolean} autoIncrement, define if the column value is auto incremented
* default value is false
*/
autoIncrement?: boolean | undefined;
/**
* @property {boolean} unique, define if column value should be unique. Default value
* is false
*/
unique?: boolean | undefined;
/**
* @property {boolean} indexed, define if column value should be indexed. Default value
* is false
*/
indexed?: boolean | undefined;
/**
* @property {string} type, define type of the column, type must be compatible with
* the field type plus the sqlite manged type
*/
type?: string | undefined;
}