<?php

namespace App\Console\Commands;

use App\Modules\Company\WorkerRequest\WorkerRequestManagementModule;
use Illuminate\Support\Facades\Log; 

use Illuminate\Console\Command;

class CronWorkerRequestSetStatusToExpire extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'cron:worker-request-set-status-to-expire';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Set Worker Request to expire if record date end column exeeds current date';

    /**
     * Execute the console command.
     *
     * @return int
     */
    public function handle()
    {
        Log::info('Task Scheduler Command Start : Set Worker Request to Expire if Date End Column exeeds current date');

        (new WorkerRequestManagementModule())->itemsSetStatusToExpire();
    }
}
