<?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('business_debts', function (Blueprint $table) {
            $table->id();
            $table->string('provider_name');
            $table->string('description')->nullable();
            $table->decimal('total_amount', 12, 2);
            $table->decimal('remaining_balance', 12, 2);
            $table->date('due_date');
            $table->enum('status', ['pending', 'paid', 'cancelled'])->default('pending');
            $table->timestamps();
        });
    }

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