<?php

namespace App\Console;

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

class Kernel extends ConsoleKernel
{   

    protected $commands = [
        \App\Console\Commands\DeleteTempProductFiles::class,
        \App\Console\Commands\ProductReceiptNotification::class,
        \App\Console\Commands\DeleteNotification::class,
    ];

    /**
     * Define the application's command schedule.
     */
    protected function schedule(Schedule $schedule): void
    {
        $schedule->command('check:product-receipt-notification')->hourly();
        $schedule->command('check:exchange-price')->twiceDaily(1, 13);
        $schedule->command('app:delete-notification')->dailyAt('00:00');
        
        $schedule->command('check:finished-auctions')->everyMinute();
        
        $schedule->command('auction:starting-alert')->everyMinute();
        $schedule->command('auction:ending-alert')->everyMinute();

        $schedule->command('cash:payment-followup')->dailyAt('09:00');
        
    }

    /**
     * Register the commands for the application.
     */
    protected function commands(): void
    {
        $this->load(__DIR__.'/Commands');

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