• 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

    Example

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

    Returns void

Properties

Properties

Abstract: {
    <M>(options): ClassDecorator;
    (target): void;
}

Type declaration

    • <M>(options): ClassDecorator
    • Type Parameters

      Parameters

      Returns ClassDecorator

    • (target): void
    • Parameters

      Returns void