const Sequelize = require("sequelize");
const db = require("../../db");

module.exports = db.sequelize.define("reviews", {
  id: {
    type: Sequelize.INTEGER,
    primaryKey: true,
    autoIncrement: true
  },

  topic: {
    type: Sequelize.INTEGER
  },
  message: {
    type: Sequelize.STRING
  },
  point: {
    type: Sequelize.INTEGER
  },
  image: {
    type: Sequelize.TEXT
  },
  shop: {
    type: Sequelize.INTEGER,
    references: 'shops',
    referencesKey: 'id'
  },
  user: {
    type: Sequelize.INTEGER,
    references: 'users',
    referencesKey: 'id'
  }
});
