<?php
declare(strict_types=1);

namespace CronJobs;

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

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

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

    public function run(): array
    {
        $result = MakeupSessionService::expireOverdue();
        Logger::info("SaMakeupExpiryJob: expired {$result['expired_count']} makeup sessions");
        return ['processed' => $result['expired_count']];
    }
}
