<?php

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

class CreateAlprTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('Alpr', function (Blueprint $table) {
            $table->bigIncrements('No');
            $table->string("Plate_Number",10);
            $table->string("Car_Type",5);
            //$table->timestamp("Point A Enter DateTime");
            $table->dateTime("Point_A_Enter_DateTime",1);
            $table->string("Point_A_Device");
            $table->string("Point_A_Image_Path");

            //$table->timestamp("Point B Enter DateTime");
            $table->dateTime("Point_B_Enter_DateTime",1);
            $table->string("Point_B_Device");
            $table->string("Point_B_Image_Path");

            $table->integer("Passing_Time");
            $table->float("Distance");
            $table->float("Speed");
            $table->integer("Speed_Limit");

            $table->string("Prohibited_Vehicles");
            $table->string("Violation");
            $table->string("Location");
            $table->integer("Case_Number")->nullable();
            $table->string("Status");
            $table->timestamps();
        });
    }

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