<?php

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

class AddAuthoritiesLaborReports 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();
    }
}
