<?php

namespace App\Console;

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

class Kernel extends ConsoleKernel
{
        /**
         * Define the application's command schedule.
         *
         * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
         * @return void
         */
        protected function schedule(Schedule $schedule)
        {
                // $schedule->command('inspire')->hourly();
                //每日餐单通知
//        $schedule->command('guide:notice')->dailyAt('07:00');
                //每日餐单余量通知
                //每日餐单通知
                $schedule->command('order:scheme:remain:msg')->dailyAt('09:00');
                //生成绑定微信
                $schedule->command('qrcode:bindWork')->everyMinute();
                //更新微信群名称
                // $schedule->command('group:chatName')->everyMinute();
                //更新会议室状态
                $schedule->command('update:meeting:room')->everyMinute();
                //更新餐饮状态
                $schedule->command('update:restaurant:status')->everyMinute();
                //发送午餐餐饮订餐通知
//        $schedule->command('send:reserve:restaurant:msg',[0])->dailyAt('09:00');
                //发送晚餐餐饮订餐通知
//        $schedule->command('send:reserve:restaurant:msg',[1])->dailyAt('14:00');
                //发送午餐餐饮评价通知
//        $schedule->command('send:evaluate:restaurant:msg',[0])->dailyAt('13:00');
                //发送晚餐餐饮评价通知
//        $schedule->command('send:evaluate:restaurant:msg',[1])->dailyAt('19:00');
                //同步网易云用户
                $schedule->command('add:wang:yi:user')->everyMinute();
                //运动步数上传提醒
                $schedule->command('step:submit:notice')->dailyAt('19:00');
                //同步抽奖名单
//        $schedule->command('sync:lottery_member')->everyMinute();
                //生成日志表
                $schedule->command('table:access_logs')->quarterly();
                //生成睡眠数据表
//        $schedule->command('table:band_sleeps')->monthly();
//        //生成体温数据表
//        $schedule->command('table:band_temps')->monthly();
//        //生成心率数据表
//        $schedule->command('table:band_hrrests')->monthly();
//        //生成Hrv详细信息
//        $schedule->command('table:band_hrvs')->monthly();
//        //生成血氧数据表
//        $schedule->command('table:band_bloods')->monthly();
//        //生成综合详细信息
//        $schedule->command('table:band_syns')->monthly();
//        //生成睡眠数据表
                $schedule->command('table:band_origin_sleeps')->monthly();
                //生成体温数据表
                $schedule->command('table:band_origin_temps')->monthly();
                //生成心率数据表
                $schedule->command('table:band_origin_hrrests')->monthly();
                //生成Hrv详细信息
                $schedule->command('table:band_origin_hrvs')->monthly();
                //生成血氧数据表
                $schedule->command('table:band_origin_bloods')->monthly();
                //生成综合详细信息
                $schedule->command('table:band_origin_syns')->monthly();

                //生成电量消耗数据
                $schedule->command('table:band_origin_battery')->monthly();

                $schedule->command('create:restaurant:date')->monthlyOn(20, "01:00");
                $schedule->command('update:restaurant:date')->dailyAt("02:00");

                //检测定期活动状态
                $schedule->command("check:regular_activity")->everyMinute();

                //app网易云信消息通知
                $schedule->command('send:im:msg', [1])->dailyAt("18:00");
                $schedule->command('send:im:msg', [2])->dailyAt("10:00");
                $schedule->command('send:im:msg', [3])->everyThirtyMinutes();

                // 方案结束后未填写问卷调查提醒
                $schedule->command('order:finished quesiotn_notice')->dailyAt("10:00");
                // 方案结束后未上传方案后身体照提醒通知
                $schedule->command('order:finished after_body_image')->dailyAt("10:00");
                // 方案结束后未上传方案后身体照提醒任务
                $schedule->command('order:finished after_body_image_task')->dailyAt("10:00");
                // 方案结束后提醒用户上传复检报告
                $schedule->command('order:finished:medical_report')->dailyAt("10:00");
                // 方案结束后提醒教练填写评估表
                $schedule->command('order:finished server_question_3')->dailyAt("10:00");
                $schedule->command('order:finished server_question_60')->dailyAt("10:00");

                // 方案结束后提醒清洁保养
                $schedule->command("order:finished clean_notice")->weeklyOn(0, "20:30");

                // 每日步数提醒
                // $schedule->command("remind:daily_step")->dailyAt("08:00");

        }

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

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