<?php

use Illuminate\Database\Migrations\Migration;

class AddOrderTrackingAuth extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        (new \App\Authority(['name'=>'订单管理-跟踪','alias_name'=>'订单管理-跟踪']))->save();
        (new \App\Authority(['name'=>'订单管理-跟踪-仓库编辑','alias_name'=>'订单管理-跟踪-仓库编辑']))->save();
        (new \App\Authority(['name'=>'订单管理-跟踪-物流公司编辑','alias_name'=>'订单管理-跟踪-物流公司编辑']))->save();
        (new \App\Authority(['name'=>'订单管理-跟踪-监听','alias_name'=>'订单管理-跟踪-监听']))->save();
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        \App\Authority::where('name','订单管理-跟踪')->delete();
        \App\Authority::where('name','订单管理-跟踪-仓库编辑')->delete();
        \App\Authority::where('name','订单管理-跟踪-物流公司编辑')->delete();
        \App\Authority::where('name','订单管理-跟踪-监听')->delete();
    }
}
