<?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('_road_tollhouse_managements', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->unsignedInteger('user_id')->nullable()->index('road_tollhouse_managements_user_id_foreign');
            $table->string('axis_name')->nullable();
            $table->unsignedTinyInteger('axis_type')->nullable();
            $table->string('axis_type_fa')->nullable();
            $table->string('project_name')->nullable();
            $table->unsignedTinyInteger('province_id')->nullable()->index('road_tollhouse_managements_province_id_foreign');
            $table->binary('province_fa')->nullable();
            $table->longText('cities_id')->nullable();
            $table->string('city_1_fa')->nullable();
            $table->string('city_2_fa')->nullable();
            $table->string('city_3_fa')->nullable();
            $table->string('contractor_name')->nullable();
            $table->string('consultant_name')->nullable();
            $table->string('contract_date')->nullable();
            $table->string('contract_credit')->nullable();
            $table->string('start_latlng')->nullable();
            $table->string('end_latlng')->nullable();
            $table->timestamp('submited_at')->nullable();
            $table->string('submited_at_fa')->nullable();
            $table->timestamp('last_updated_at')->nullable();
            $table->string('last_updated_at_fa')->nullable();
            $table->longText('project_distance')->nullable();
            $table->longText('project_distance_update')->nullable();
            $table->string('contractor_credit')->nullable();
            $table->string('physical_progress')->nullable();
            $table->text('description')->nullable();
            $table->boolean('status')->default(false);
            $table->boolean('project_status')->default(false);
            $table->string('project_status_fa')->nullable();
            $table->text('project_description')->nullable();
            $table->boolean('rate')->nullable();
            $table->string('rate_desc')->nullable();
            $table->timestamps();
        });
    }

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