<?php

use App\Authority;
use Illuminate\Database\Migrations\Migration;

class AddOrderIssueAuthority extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Authority::query()->firstOrCreate(['name'=>'订单管理-问题件-处理结果添加','alias_name'=>'订单管理-问题件-处理结果添加']);
        Authority::query()->firstOrCreate(['name'=>'订单管理-问题件-处理结果删除','alias_name'=>'订单管理-问题件-处理结果删除']);
        Authority::query()->firstOrCreate(['name'=>'订单管理-问题件-客户自定义订单号','alias_name'=>'订单管理-问题件-客户自定义订单号','permission'=>'禁止']);
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Authority::query()->where('name','订单管理-问题件-处理结果添加')->delete();
        Authority::query()->where('name','订单管理-问题件-处理结果删除')->delete();
        Authority::query()->where('name','订单管理-问题件-客户自定义订单号')->delete();
    }
}
