<?php

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

class CreateMineListTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('mine_list', function (Blueprint $table) {
            $table->bigIncrements('id')->comment('矿区列表');
            $table->integer('parent_id')->index()->comment('父级id');
            $table->string('title', 100)->comment('矿区标题名称');
            $table->string('slug')->comment('标识');
            $table->integer('sort')->default(1)->comment('排序');
            $table->tinyInteger('tier')->default(1)->comment('层级');
            $table->string('degree', 30)->nullable()->comment('层级关联');
            $table->tinyInteger('show')->default(1)->comment('是否显示 1:是 2:否');
            $table->tinyInteger('can_del')->default(1)->comment('是否可以删除 1:是 2:否');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('mine_list');
    }
}
