<?php
namespace App\Console;

use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;

class Kernel extends ConsoleKernel
{
    protected $commands = [
        Commands\UpdateSlaStatus::class,
        Commands\GenerateRecurringInvoice::class,
        Commands\RemindVisits::class,
        Commands\RemindInvoices::class,
    ];

    protected function schedule(Schedule $schedule): void
    {
        $schedule->command('sla:update')->everyFifteenMinutes();
        $schedule->command('invoice:remind')->dailyAt('09:00');
        $schedule->command('invoice:recurring')->monthlyOn(1, '08:00');
        $schedule->command('visit:remind')->dailyAt('08:00');
    }

    protected function commands(): void
    {
        $this->load(__DIR__.'/Commands');
        require base_path('routes/console.php');
    }
}
