text: const Sequelize = require('sequelize')
  const db = require('../db')
  
  const Review = db.define('review', {
    rating: {
      type: Sequelize.INTEGER,
      allowNull: false,
      validate: {
        max: 5,
        min: 1
      }
    },
    text: {
      type: Sequelize.TEXT,
      allowNull: false,
      validate: {
        notEmpty: true,
        len: [50, 9999]
      }
    }
  })
  
  // All reviews must be between 120 and 9999 characters
  
  module.exports = Review
  