UNPKG

@sequelize/core

Version:

Sequelize is a promise-based Node.js ORM tool for Postgres, MySQL, MariaDB, SQLite, Microsoft SQL Server, Amazon Redshift, Snowflake’s Data Cloud, Db2, and IBM i. It features solid transaction support, relations, eager and lazy loading, read replication a

25 lines (24 loc) 968 B
import type { Model, ModelOptions, ModelStatic } from '../../model.js'; /** * The `@Table` decorator is used to configure a model. It is used on a model class, and takes an object as parameter.<br /> * Using this decorator is completely optional, you only need to use it if you want to configure one of the options of your model. * * @example * ```ts * @Table({ * tableName: 'users', * timestamps: false, * }) * class User extends Model<InferAttributes<User>, InferCreationAttributes<User>> {} * ``` * * @param options */ export declare function Table<M extends Model = Model>(options: ModelOptions<M>): ClassDecorator; export declare function Table(target: ModelStatic): void; export declare namespace Table { var Abstract: typeof AbstractTable; } declare function AbstractTable<M extends Model = Model>(options: Omit<ModelOptions<M>, 'tableName' | 'name'>): ClassDecorator; declare function AbstractTable(target: ModelStatic): void; export {};