@cyber-rom/nestjs-scylladb
Version:
Based on https://www.npmjs.com/package/@ouato/nestjs-express-cassandra With support columns name mapping
20 lines (17 loc) • 559 B
text/typescript
import {ColumnType, DataType} from './data.type';
export interface ColumnOptions {
name?: string;
rule?: ColumnRuleOptions | ((value: any) => boolean);
type?: ColumnType | DataType;
static?: boolean;
typeDef?: string;
default?: string | (() => any) | Function | {$db_function: string};
virtual?: {get?: any; set?: any};
}
export interface ColumnRuleOptions {
ignore_default?: boolean;
validators?: any[];
validator?: (value: any) => boolean;
required?: boolean;
message?: string | ((value: any) => string);
}