22 lines
826 B
TypeScript
22 lines
826 B
TypeScript
import db from './src/database/models/index.js';
|
|
|
|
async function check() {
|
|
const app = await db.Application.findOne({ where: { applicationId: 'APP-2026-D444A1' } });
|
|
if (!app) {
|
|
console.log('Application APP-2026-D444A1 not found');
|
|
return;
|
|
}
|
|
console.log(`Application: APP-2026-D444A1, id: ${app.id}, Status: ${app.overallStatus}, Stage: ${app.currentStage}`);
|
|
|
|
const progress = await db.ApplicationProgress.findAll({ where: { applicationId: app.id } });
|
|
console.log('--- Application Progress ---');
|
|
progress.forEach(p => console.log(`Stage: ${p.stageName}, Status: ${p.status}`));
|
|
|
|
const loiReq = await db.LoiRequest.findOne({ where: { applicationId: app.id } });
|
|
console.log(`LoiRequest: ${loiReq ? loiReq.status : 'NOT FOUND'}`);
|
|
|
|
process.exit(0);
|
|
}
|
|
|
|
check();
|