<?php

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

class CreateLeadersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('leaders', function (Blueprint $table) {
            $table->id();
            $table->unsignedBigInteger('category_id')->index();
            $table->string('title')->comment('标题');
            $table->string('cover')->nullable();
            $table->string('head')->comment('带头人');
            $table->string('reserve')->comment('后备带头人');
            $table->string('description')->nullable();
            $table->text('content');
            $table->boolean('status')->default(0);
            $table->integer('order')->comment('排序')->default(1);
            $table->timestamps();
        });
    }

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