const { getPool } = require('./partnerModel');

async function findActive() {
  const db = getPool();
  const [rows] = await db.query(
    `SELECT project_id, job_no, project_name, site
     FROM projects
     WHERE is_active = 1 AND project_status = 'active'
     ORDER BY project_name`);
  return rows;
}

module.exports = { findActive };
