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

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

  name: {
    type: Sequelize.STRING
  },
  nameeng: {
    type: Sequelize.STRING
  },
  timeopen: {
    type: Sequelize.DATE
  },
  timeclose: {
    type: Sequelize.DATE
  },
  address: {
    type: Sequelize.TEXT
  },
  tel: {
    type: Sequelize.STRING
  },
  detail: {
    type: Sequelize.TEXT
  },
  map: {
    type: Sequelize.TEXT
  },
  facebook: {
    type: Sequelize.TEXT
  },
  userId: {
    type: Sequelize.INTEGER,
    references: 'users',
    referencesKey: 'id'
  },
  type: {
    type: Sequelize.ENUM(
      "สปาและนวด",
      "ผิวหน้า",
      "ขนตาและคิ้ว",
      "ทำเล็บ",
      "ชาลอน",
      "แต่งหน้าทำผม"
    )
  }
 

  
});
