<?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('case_progressions', function (Blueprint $table) {
            $table->id();
            $table->foreignId('claim_id')->constrained()->onDelete('cascade');

            $table->boolean('aml_checks')->default(false);
            $table->boolean('id_certified')->default(false);
            $table->boolean('bank_statement')->default(false);
            $table->boolean('supporting_statement')->default(false);
            $table->boolean('initial_registration')->default(false);
            $table->boolean('dsars_sent_out')->default(false);
            $table->boolean('supplementary_statement')->default(false);
            $table->boolean('submitted')->default(false);

            $table->timestamps();

            $table->unique('claim_id');
        });
    }

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