import DataTypes from 'sequelize';

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