<?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('rahdari_points', function (Blueprint $table) {
            $table->smallIncrements('id');
            $table->unsignedTinyInteger('province_id')->nullable()->index('rahdari_points_province_id_foreign');
            $table->unsignedSmallInteger('city_id')->nullable()->index('rahdari_points_city_id_foreign');
            $table->string('province_name')->nullable();
            $table->string('city_name')->nullable();
            $table->string('name')->nullable();
            $table->string('status')->nullable();
            $table->string('type')->nullable();
            $table->string('team_num')->nullable();
            $table->string('staff_num')->nullable();
            $table->string('phone')->nullable();
            $table->string('responsible_name')->nullable();
            $table->string('responsible_mobile')->nullable();
            $table->string('successor_name')->nullable();
            $table->string('successor_mobile')->nullable();
            $table->string('machines_light')->nullable();
            $table->string('machines_sheavy')->nullable();
            $table->string('machines_heavy')->nullable();
            $table->string('code')->nullable();
            $table->string('lat')->nullable();
            $table->string('lng')->nullable();
            $table->timestamps();
            $table->string('lat_from')->nullable();
            $table->string('lng_from')->nullable();
            $table->string('lat_to')->nullable();
            $table->string('lng_to')->nullable();
            $table->string('color')->nullable();
            $table->mediumText('geometry')->nullable();
            $table->string('type_fa')->nullable();
            $table->string('updated_at_fa')->nullable();
        });
    }

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