'use strict'

const Sequelize = require('sequelize')
const db = require('APP/db')

const Review = db.define('review', {
  rating: {
    type: Sequelize.INTEGER,
    allowNull: false,
  },
  description: Sequelize.TEXT,
})

module.exports = Review;

'use strict'

const Sequelize = require('sequelize')
const db = require('APP/db')

const Review = db.define('review', {
  rating: {
    type: Sequelize.INTEGER,
    allowNull: false,
    validate: {
      min: 1,
      max: 5,
    },
  },
  description: Sequelize.TEXT,
})

module.exports = Review;

Fix ratings to validate between 1 and 5.
Fix ratings to validate between 1 and 5.
