<?php

namespace App\Console;

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

class Kernel extends ConsoleKernel
{
    /**
     * The Artisan commands provided by your application.
     *
     * @var array
     */
    protected $commands = [
        \App\Console\Commands\LogExpireDelete::class,
        \App\Console\Commands\MakeServiceCommand::class,
        \App\Console\Commands\FluxOrderFix::class,
        \App\Console\Commands\InventoryDailyLoggingOwner::class,
        \App\Console\Commands\WASSyncWMSOrderInformation::class,
        \App\Console\Commands\SyncLogCacheTask::class,
        \App\Console\Commands\SyncUserVisitMenuLogsCacheTask::class,
        \App\Console\Commands\TestTemp::class,
    ];

    /**
     * Define the application's command schedule.
     *
     * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
     * @return void
     */
    protected function schedule(Schedule $schedule)
    {
        $schedule->command('LogExpireDelete')->dailyAt('00:01');
        $schedule->command('InventoryDailyLoggingOwner')->dailyAt('08:00');
        $schedule->command('FluxOrderFix')->hourlyAt(1);
//        $schedule->command('FluxOrderFix')->cron('* * * * *');
        $schedule->command('WASSyncWMSOrderInformation')->everyMinute();
        $schedule->command('syncLogCacheTask')->everyMinute();
        $schedule->command('createOwnerReport')->monthlyOn(1);
        $schedule->command('createOwnerBillReport')->monthlyOn(1);
        $schedule->command('createOwnerAreaReport')->monthlyOn(25);
    }

    /**
     * Register the commands for the application.
     *
     * @return void
     */
    protected function commands()
    {
        $this->load(__DIR__ . '/Commands');
        require base_path('routes/console.php');
    }
}
