import DataTypes from 'sequelize';

export default (sequelize) => {
    sequelize.define(
        'trims',
        {
            id: {
                allowNull: false,
                autoIncrement: true,
                primaryKey: true,
                type: DataTypes.INTEGER,
            },
            name: {
                allowNull: false,
                type: DataTypes.STRING,
            },
            price: {
                allowNull: false,
                type: DataTypes.DECIMAL(10, 2),
            },
        },
        {
            tableName: 'trims',
            timestamps: true,
        }
    );
};