
import dotenv from 'dotenv';
import path from 'path';
import { fileURLToPath } from 'url';

const __dirname = path.dirname(fileURLToPath(import.meta.url));
dotenv.config({ path: path.join(__dirname, '../.env') });

import db from '../src/database/models/index.js';

async function run() {
  try {
    const u = await db.User.findOne({ 
      where: { fullName: { [db.Sequelize.Op.iLike]: '%abhishek%' } } 
    });
    console.log(JSON.stringify(u, null, 2));
    process.exit(0);
  } catch (error) {
    console.error('Error:', error);
    process.exit(1);
  }
}

run();
