<?php

use App\Menu;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class SeedMenusLevel1 extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        \App\Menu::create([
            'name'=>'退货管理',
            'level'=>1,
            'route'=>'rejected/index/general',
            'sequence'=>1,
        ]);
        \App\Menu::create([
            'name'=>'入库管理',
            'level'=>1,
            'route'=>'store/checkingReceive/mission',
            'sequence'=>2,
        ]);
        \App\Menu::create([
            'name'=>'订单管理',
            'level'=>1,
            'route'=>'order/index/delivering',
            'sequence'=>3,
        ]);
        \App\Menu::create([
            'name'=>'运输管理',
            'level'=>1,
            'route'=>'waybill/index',
            'sequence'=>4,
        ]);
        \App\Menu::create([
            'name'=>'称重管理',
            'level'=>1,
            'route'=>'package',
            'sequence'=>5,
        ]);
        \App\Menu::create([
            'name'=>'库存管理',
            'level'=>1,
            'route'=>'inventory/statement/allInventory',
            'sequence'=>6,
        ]);
        \App\Menu::create([
            'name'=>'二次加工管理',
            'level'=>1,
            'route'=>'process',
            'sequence'=>7,
        ]);
        \App\Menu::create([
            'name'=>'客户管理',
            'level'=>1,
            'route'=>'customer/project/area',
            'sequence'=>8,
        ]);
        \App\Menu::create([
            'name'=>'人事管理',
            'level'=>1,
            'route'=>'personnel/laborReport',
            'sequence'=>9,
        ]);
        \App\Menu::create([
            'name'=>'基础设置',
            'level'=>1,
            'route'=>'maintenance',
            'sequence'=>10,
        ]);
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Menu::query()->where('level',1)->delete();
    }
}
