<?php

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

class CreateStationTasksTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('station_tasks', function (Blueprint $table) {
            $table->id();
            $table->integer('station_id');
            $table->integer('station_type_id')->nullable()->index();
            $table->enum('status',['待处理','挂起','处理中','完成','异常','取消'])->index();
            $table->timestamps();
        });
    }

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