text: export default (sequelize, DataTypes) => {
    const Rating = sequelize.define(
      'Rating',
      {
        id: {
          allowNull: true,
          primaryKey: true,
          autoIncrement: true,
          type: DataTypes.INTEGER
        },
        user_id: {
          type: DataTypes.INTEGER,
          allowNull: false,
          validate: {
            isNumeric: true
          }
        },
        accommodation_id: {
          type: DataTypes.INTEGER,
          allowNull: false,
          validate: {
            isNumeric: true
          }
        },
        ratings: {
          type: DataTypes.INTEGER,
          allowNull: false,
          validate: {
            isNumeric: true
          }
        }
      },
      {}
    );
    Rating.associate = models => {
      Rating.belongsTo(models.User, {
        foreignKey: 'user_id',
        onDelete: 'CASCADE'
      });
      Rating.belongsTo(models.Accommodation, {
        foreignKey: 'accommodation_id',
        onDelete: 'CASCADE'
      });
    };
    return Rating;
  };
  