<?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('membership_application_heirs', function (Blueprint $table) {
            $table->uuid('id')->primary();
            $table->foreignUuid('membership_application_id')->constrained('membership_applications')->onDelete('cascade');
            $table->string('name');
            $table->string('ic_number');
            $table->string('relationship')->comment('Isteri, Anak, Orang Tua, Saudara, Lain-lain');
            $table->string('phone_number');            
            $table->timestamps();
        });
    }

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