const Sequelize = require("sequelize");
const db = require("../../db");
const User = require('../user')
const BeauticianImage = require("../beauticianImg")

const Beautician   = db.sequelize.define("beauticians", {
  id: {
    type: Sequelize.INTEGER,
    primaryKey: true,
    autoIncrement: true
  },
  name: {
    type: Sequelize.TEXT,
  },
  email: {
    type: Sequelize.TEXT,
  },
  address: {
    type: Sequelize.TEXT,
  },
  tel: {
    type: Sequelize.TEXT,
  },
  shopID: {
    type: Sequelize.INTEGER,
    references: 'shops',
    referencesKey: 'id'
  }
  
});

Beautician.hasMany(BeauticianImage, { foreignKey: 'image_id' });
module.exports = Beautician;