import DataTypes from 'sequelize';

export default (sequelize) => {
    sequelize.define(
        'engines',
        {
            id: {
                allowNull: false,
                autoIncrement: true,
                primaryKey: true,
                type: DataTypes.INTEGER,
            },
            type: {
                allowNull: false,
                type: DataTypes.STRING,
            },
            powerHR: {
                allowNull: false,
                type: DataTypes.INTEGER,
            },
            volume: {
                allowNull: false,
                type: DataTypes.DECIMAL(3, 1),
            },
        },
        {
            tableName: 'engines',
            timestamps: true,
        }
    );
};