<?php

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

class CreateWorkingSrufaceCameraTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('working_surface_camera', function (Blueprint $table) {
            $table->bigIncrements('id')->comment('工作面 - 摄像头关联表');
            $table->integer('surface_id')->index()->comment('工作面id(working_surface表id)');
            $table->integer('camera_id')->index()->comment('摄像头id(camera_list表id)');
            $table->timestamps();
            $table->softDeletes();
        });
    }

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