<?php

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

class AddAuthoritiesInventoryAccountMission extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        (new Authority(['name'=>'库存管理-盘点-查看','alias_name'=>'库存管理-盘点-查看']))->save();
        (new Authority(['name'=>'库存管理-盘点-完结','alias_name'=>'库存管理-盘点-完结']))->save();
        (new Authority(['name'=>'库存管理-盘点-删除','alias_name'=>'库存管理-盘点-删除']))->save();
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Authority::where('name','库存管理-盘点-查看')->delete();
        Authority::where('name','库存管理-盘点-完结')->delete();
        Authority::where('name','库存管理-盘点-删除')->delete();
    }
}
