UNPKG

@mikro-orm/core

Version:

TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.

10 lines (9 loc) 506 B
import type { PropertyOptions } from './Property'; import type { AnyEntity, Dictionary } from '../typings'; export declare function Enum<T extends object>(options?: EnumOptions<AnyEntity> | (() => Dictionary)): (target: AnyEntity, propertyName: string) => any; export interface EnumOptions<T> extends PropertyOptions<T> { items?: (number | string)[] | (() => Dictionary); array?: boolean; /** for postgres, by default it uses text column with check constraint */ nativeEnumName?: string; }