'use strict';
const bcrypt = require('bcrypt');
const { faker } = require('@faker-js/faker');
const { Settings } = require('../models');
const { v4 } = require('uuid');

/** @type {import('sequelize-cli').Migration} */
module.exports = {
  async up(queryInterface, Sequelize) {
    try {
      await Settings.create({
        branch_id: '9c390431-887d-4d9d-82d1-ca92d1718bb9',
        setting_name: 'CONTACT_US',
        setting_type: 'CONTACT_US',
        setting_desc: JSON.stringify({
          company_name: 'As traders',
          company_email: 'email@gmail.com',
          company_number: '9876543210',
          company_address: 'karur',
          company_gst_no: '99999999999'
        }),
        created_by: 'd0563b51-274f-4c70-b070-f10c43333f9e',
      });
    } catch (error) {
      console.error('Error seeding settings data:', error);
    }
  },

  async down(queryInterface, Sequelize) {
    await queryInterface.bulkDelete('settings', null, {});
  }
};
