<?php

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

return new class extends Migration
{
    public function up(): void
    {
        Schema::create('field_job_settings', function (Blueprint $table) {
            $table->id();
            $table->foreignId('segment_id')->nullable()->constrained('segments')->nullOnDelete();
            $table->foreignId('initial_decision_id')->nullable()->constrained('decisions')->nullOnDelete();
            $table->foreignId('asign_decision_id')->nullable()->constrained('decisions')->nullOnDelete();
            $table->foreignId('complete_decision_id')->nullable()->constrained('decisions')->nullOnDelete();
            $table->timestamps();
        });
    }

    public function down(): void
    {
        Schema::dropIfExists('field_job_settings');
    }
};
