<?php

namespace App\Commands;

use App\Services\Interview\InterviewService;
use CodeIgniter\CLI\BaseCommand;
use CodeIgniter\CLI\CLI;

class InterviewsReminders extends BaseCommand
{
    protected $group       = 'Scheduler';
    protected $name        = 'interviews:reminders';
    protected $description = 'Sends reminder notifications for interviews starting within the next hour.';

    public function run(array $params)
    {
        $count = (new InterviewService())->sendReminders();
        CLI::write("Sent {$count} interview reminder(s).", 'green');
    }
}
