text: /** Define the Favourite database model/association
   * @exports Favourite
   * @param  {object} sequelize - sequelize
   * @param  {object} DataTypes - sequelize Datatypes
   * @return {object} The Favourite model
   */
  export default (sequelize, DataTypes) => {
    const Favourite = sequelize.define('Favourite', {
      businessId: {
        type: DataTypes.INTEGER,
        onDelete: 'CASCADE',
        references: {
          model: 'Businesses',
          key: 'id',
          as: 'businessId',
        }
      },
      userId: {
        type: DataTypes.INTEGER,
        onDelete: 'CASCADE',
        references: {
          model: 'Users',
          key: 'id',
          as: 'userId',
        }
      }
    });
    Favourite.associate = (models) => {
      Favourite.belongsTo(models.Business, {
        foreignKey: 'businessId',
        onDelete: 'CASCADE'
      });
      Favourite.belongsTo(models.User, {
        foreignKey: 'userId',
        onDelete: 'CASCADE'
      });
    };
    return Favourite;
  };
  