Documentation
    Preparing search index...

    Variable AutoIncrementConst

    AutoIncrement: OptionalParameterizedPropertyDecorator<boolean> = ...

    The @AutoIncrement decorator is used to make an attribute auto-increment, it is a shortcut for setting the autoIncrement option of the Attribute decorator to true.

    Some dialects require the field to be a primary key.

    class User extends Model<InferAttributes<User>, InferCreationAttributes<User>> {
    @Attribute(DataTypes.INTEGER)
    @PrimaryKey
    @AutoIncrement
    declare id: number;
    }