import 'dotenv/config';
import db from './src/database/models/index.js';
const { Application } = (db as any).default || db;

const applicationId = '6139d6f9-f3c1-4e55-903b-3516d3a08955';

async function checkApp() {
    try {
        const application = await Application.findOne({
            where: {
                [db.Sequelize.Op.or]: [
                    { id: applicationId },
                    { applicationId: applicationId }
                ]
            }
        });

        if (application) {
            console.log('Application found:', application.id);
            console.log('Status:', application.overallStatus);
            console.log('Current Stage:', application.currentStage);
        } else {
            console.log('Application not found.');
        }

    } catch (error) {
        console.error('Error checking application:', error);
    } finally {
        process.exit();
    }
}

checkApp();
