<?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::table('users', function (Blueprint $table) {
            $table->decimal('demo_balance', 15, 2)->default(10000.00)->after('country');
            $table->decimal('real_balance', 15, 2)->default(0.00)->after('demo_balance');
            $table->decimal('bonus_balance', 15, 2)->default(0.00)->after('real_balance');
            $table->enum('active_account', ['demo', 'real', 'bonus'])->default('demo')->after('bonus_balance');
        });
    }

    public function down(): void
    {
        Schema::table('users', function (Blueprint $table) {
            $table->dropColumn(['demo_balance', 'real_balance', 'bonus_balance', 'active_account']);
        });
    }
};
