UNPKG

sqlmongoose

Version:

Mongoose-like schemas and models for SQLite3

26 lines (25 loc) 777 B
import 'reflect-metadata'; export declare enum SchemaType { STRING = "string", NUMBER = "number", BOOLEAN = "boolean", DATE = "date", OBJECT = "object" } declare global { namespace Reflect { function defineMetadata(metadataKey: string, metadataValue: any, target: Object): void; function getMetadata(metadataKey: string, target: Object): any; } } export declare function Entity(name: string): (constructor: Function) => void; export declare function Field(options: { type?: SchemaType; required?: boolean; unique?: boolean; default?: any; ref?: string; }): (target: any, propertyKey: string) => void; export declare function Index(options?: { unique?: boolean; }): (target: any, propertyKey: string) => void;