title: User.create is not a function (Sequelize Error)
body: <p>I successfully created migrations using sequelize cli, but now when trying to make request in postman I'm getting the error:</p>
  <pre><code>User.create is not a function 
  </code></pre>
  <p>I don't know what's wrong with my application's model, I also tried changing the import on the page to</p>
  <pre><code>const { Customer } = require('../../models/customer');
  
  </code></pre>
  <p>rather than</p>
  <pre><code>const Customer = require('../../models/customer');
  
  </code></pre>
  <p>But in this case I get the error</p>
  <pre><code>TypeError: Cannot read properties of undefined (reading 'create')
  </code></pre>
  <p>Here the customer model</p>
  <pre><code>'use strict';
  const {
    Model
  } = require('sequelize');
  module.exports = (sequelize, DataTypes) =&gt; {
    class Customer extends Model {
      /**
       * Helper method for defining associations.
       * This method is not a part of Sequelize lifecycle.
       * The `models/index` file will call this method automatically.
       */
      static associate(models) {
        // define association here
      }
    }
    Customer.init({
      name: DataTypes.STRING,
      email: DataTypes.STRING,
      password: DataTypes.STRING,
      country: DataTypes.STRING,
      city: DataTypes.STRING,
      state: DataTypes.STRING,
      address: DataTypes.STRING,
      postalCode: DataTypes.STRING
    }, {
      sequelize,
      modelName: 'Customer',
    });
    return Customer;
  };
  </code></pre>
  <p>index model</p>
  <pre><code>'use strict';
  
  const fs = require('fs');
  const path = require('path');
  const Sequelize = require('sequelize');
  const basename = path.basename(__filename);
  const env = process.env.NODE_ENV || 'development';
  const config = require(__dirname + '/../config/config.json')[env];
  const db = {};
  
  let sequelize;
  if (config.use_env_variable) {
    sequelize = new Sequelize(process.env[config.use_env_variable], config);
  } else {
    sequelize = new Sequelize(config.database, config.username, config.password, config);
  }
  
  fs
    .readdirSync(__dirname)
    .filter(file =&gt; {
      return (file.indexOf('.') !== 0) &amp;&amp; (file !== basename) &amp;&amp; (file.slice(-3) === '.js');
    })
    .forEach(file =&gt; {
      const model = require(path.join(__dirname, file))(sequelize, Sequelize.DataTypes);
      db[model.name] = model;
    });
  
  Object.keys(db).forEach(modelName =&gt; {
    if (db[modelName].associate) {
      db[modelName].associate(db);
    }
  });
  
  db.sequelize = sequelize;
  db.Sequelize = Sequelize;
  
  module.exports = db;
  
  </code></pre>
  <p>controller</p>
  <pre><code>const {Customer} = require('../../models/customer');
  
  module.exports = {
      async store (req, res) {
          try {
              const { name, email, password, country, city, state, address, postalCode } = req.body;
  
              const customer = await Customer.create({ name, email, password, country, city, state, address, postalCode });
              
              return res.status(200).json(customer);
          } catch (err) {
              return console.log(err);
          }
      }
  }
  
  </code></pre>