<?php

declare(strict_types=1);

namespace App\Console;

use App\Jobs\Eboekhouden\GenerateInvoices;
use App\Jobs\Paynl\FetchMerchantsAndPaymentMethods;
use App\Jobs\Paynl\FetchStatistics;
use App\Jobs\Paynl\FetchTerminals;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;

class Kernel extends ConsoleKernel
{
    protected function schedule(Schedule $schedule): void
    {
        $schedule->job(FetchMerchantsAndPaymentMethods::class)->monthlyOn();
        $schedule->job(FetchTerminals::class)->monthlyOn(1, '00:01');
        $schedule->job(FetchStatistics::class)->monthlyOn(1, '00:02');
        $schedule->job(GenerateInvoices::class)->quarterlyOn(1, '01:00');
    }

    protected function commands(): void
    {
        $this->load(__DIR__ . '/Commands');

        require base_path('routes/console.php');
    }
}
