'use strict';
/** @type {import('sequelize-cli').Migration} */
module.exports = {
  async up (queryInterface, Sequelize) {
    await queryInterface.createTable('services', {
      service_id: {
        allowNull: false,
        autoIncrement: true,
        primaryKey: true,
        type: Sequelize.DataTypes.INTEGER
      },
      service_name: {
        type: Sequelize.DataTypes.STRING(100),
        allowNull: false,
        comment: 'Название услуги'
      },
      price: {
        type: Sequelize.DataTypes.DECIMAL(10, 2),
        allowNull: false,
        comment: 'Цена услуги'
      },
      duration_minutes: {
        type: Sequelize.DataTypes.INTEGER,
        allowNull: true,
        comment: 'Длительность в минутах'
      },
      description: {
        type: Sequelize.DataTypes.TEXT,
        allowNull: true,
        comment: 'Описание услуги'
      }
    })
  },
  async down (queryInterface, Sequelize) {
    await queryInterface.dropTable('services')
  }
}