<?php

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

class CreateCameraListTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('camera_list', function (Blueprint $table) {
            $table->bigIncrements('id')->comment('摄像头管理表');
            $table->integer('mine_id')->index()->comment('矿区id(mine_list表id)');
            $table->string('ip', 50)->nullable()->comment('ip地址');
            $table->string('port', 10)->nullable()->comment('端口');
            $table->string('user_name', 50)->nullable()->comment('用户名');
            $table->string('password', 100)->nullable()->comment('密码');
            $table->string('com_number', 100)->nullable()->comment('通讯号');
            $table->tinyInteger('status')->default(0)->comment('状态');
            $table->string('camera_url')->nullable()->comment('拼接完成的请求链接');
            $table->timestamps();
            $table->softDeletes();
        });
    }

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