<?php

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

class CreateAlarmOrderTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('alarm_order', function (Blueprint $table) {
            $table->increments('id')->comment('主键');
            $table->string('order_num', 32)->unique()->comment('工单号');
            $table->integer('user_id')->comment('用户ID');
            $table->integer('device_id')->comment('设备ID');
            $table->integer('reportpolice_id')->comment('报警记录id');
            $table->tinyInteger('is_live')->comment('1到达现场，2未到达现场');
            $table->tinyInteger('is_verified')->comment('1属实，2不属实');
            $table->string('content')->comment('反馈内容');
            $table->tinyInteger('state')->comment('工单状态，0：进行中, 1完成，2，异常终止。');
            $table->timestamps();
        });
    }

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