<?php
declare(strict_types=1);

namespace CronJobs;

use App\Core\Database;
use App\Core\Logger;
use App\Modules\SportsActivity\Services\PlayerLifecycleService;

class SaMedicalGraceJob
{
    private Database $db;
    public function __construct(Database $db) { $this->db = $db; }

    public function shouldRun(): bool
    {
        return true;
    }

    public function run(): array
    {
        $result = PlayerLifecycleService::checkMedicalGraceExpired();
        Logger::info("SaMedicalGraceJob: suspended {$result['suspended']} players");
        return ['processed' => $result['suspended']];
    }
}
