• The @Table decorator is used to configure a model. It is used on a model class, and takes an object as parameter.
    Using this decorator is completely optional, you only need to use it if you want to configure one of the options of your model.

    Type Parameters

    Parameters

    Returns ClassDecorator

    @Table({
    tableName: 'users',
    timestamps: false,
    })
    class User extends Model<InferAttributes<User>, InferCreationAttributes<User>> {}
  • The @Table decorator is used to configure a model. It is used on a model class, and takes an object as parameter.
    Using this decorator is completely optional, you only need to use it if you want to configure one of the options of your model.

    Parameters

    Returns void

    @Table({
    tableName: 'users',
    timestamps: false,
    })
    class User extends Model<InferAttributes<User>, InferCreationAttributes<User>> {}

Properties

Properties

Abstract: {
    <M extends Model<any, any> = Model<any, any>>(
        options: Omit<ModelOptions<M>, "name" | "tableName">,
    ): ClassDecorator;
    (target: ModelStatic): void;
}