<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('camps', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->unsignedInteger('user_id')->nullable()->index('camps_user_id_foreign');
            $table->unsignedTinyInteger('province_id')->nullable()->index('camps_province_id_foreign');
            $table->string('province_fa')->nullable();
            $table->string('axis_name')->nullable();
            $table->unsignedTinyInteger('axis_type')->nullable();
            $table->string('axis_type_fa')->nullable();
            $table->unsignedTinyInteger('blockage_cause')->nullable();
            $table->string('blockage_cause_fa')->nullable();
            $table->unsignedTinyInteger('blockage_type')->nullable();
            $table->string('blockage_type_fa')->nullable();
            $table->string('blockage_length')->nullable();
            $table->string('blockage_damage_money')->nullable();
            $table->string('blockage_damage_lower_6_count')->nullable();
            $table->string('blockage_damage_higher_6_count')->nullable();
            $table->string('blockage_damage_count')->nullable();
            $table->string('active_cars_count')->nullable();
            $table->string('active_rahdar_count')->nullable();
            $table->string('prediction_time_fa')->nullable();
            $table->tinyInteger('prediction_time')->nullable();
            $table->string('block_axis_desc')->nullable();
            $table->unsignedTinyInteger('is_open')->nullable()->default(2);
            $table->string('is_open_type')->nullable();
            $table->string('is_open_type_fa')->nullable();
            $table->longText('cities_id')->nullable();
            $table->integer('city_id')->nullable();
            $table->string('city_1_fa')->nullable();
            $table->string('city_2_fa')->nullable();
            $table->string('city_3_fa')->nullable();
            $table->string('start_latlng')->nullable();
            $table->string('end_latlng')->nullable();
            $table->string('submited_at')->nullable();
            $table->string('is_open_at')->nullable();
            $table->timestamps();
        });
    }

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