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

const checkParticipants = async () => {
    try {
        const participants = await db.InterviewParticipant.findAll();
        console.log(`--- Participants Raw ---`);
        participants.forEach((p: any) => {
            console.log(`ID: ${p.id}, InterviewID: ${p.interviewId}, UserID: ${p.userId}, Status: ${p.status}`);
        });

        const users = await db.User.findAll();
        console.log(`--- Users ---`);
        users.forEach((u: any) => {
            console.log(`ID: ${u.id}, Name: ${u.name}, Role: ${u.role}`);
        });
        process.exit(0);
    } catch (err) {
        console.error(err);
        process.exit(1);
    }
};

checkParticipants();
