<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('azmayeshes', function (Blueprint $table) {
            $table->id();
            $table->foreignId('azmayesh_type_id')->constrained('azmayesh_types');
            $table->string('azmayesh_type_name');
            $table->string('lat');
            $table->string('lng');
            $table->unsignedTinyInteger('province_id');
            $table->foreign('province_id')->references('id')->on('provinces');
            $table->string('province_name');
            $table->date('request_date')->nullable();
            $table->date('report_date')->nullable();
            $table->string('request_number');
            $table->string('employer');
            $table->string('contractor');
            $table->string('work_number');
            $table->string('project_name');
            $table->string('consultant');
            $table->string('applicant');
            $table->timestamps();
        });
    }

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