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

async function check() {
  try {
    const applicationId = 'APP-2026-2709';
    const application = await db.Application.findOne({ where: { applicationId } });
    
    if (!application) {
      console.log('Application not found');
      process.exit(0);
    }
    
    const request = await db.LoaRequest.findOne({ where: { applicationId: application.id } });
    if (request) {
      console.log(`Request ID: ${request.id}, Status: ${request.status}`);
    } else {
      console.log('No LoaRequest found');
    }
    
    process.exit(0);
  } catch (e) {
    console.error(e);
    process.exit(1);
  }
}
check();
