<?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('loan_purposes', function (Blueprint $table) {
            $table->id();
            $table->string('key')->unique();      // business, study, home, other
            $table->string('label_bn');           // ব্যবসা, পড়াশোনা ...
            $table->string('label_en')->nullable();
            $table->boolean('is_active')->default(true);
            $table->unsignedInteger('sort_order')->default(0);
            $table->timestamps();
        });
    }

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