import DataTypes from 'sequelize';

export default (sequelize) => {
    sequelize.define(
        'customers',
        {
            id: {
                allowNull: false,
                autoIncrement: true,
                primaryKey: true,
                type: DataTypes.INTEGER,
            },
            name: {
                allowNull: false,
                type: DataTypes.STRING,
            },
            phone: {
                allowNull: false,
                type: DataTypes.STRING,
            },
            email: {
                allowNull: false,
                type: DataTypes.STRING,
            }
        },
        {
            tableName: 'customers',
            timestamps: true,
        }
    );
};