<?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('user_cash_wallets', function (Blueprint $table) {
            $table->id();
            $table->string('user_id', 50)->unique();

            $table->decimal('diamond_investment', 15, 2)->default(0);
            $table->decimal('gold_investment', 15, 2)->default(0);
            $table->decimal('silver_investment', 15, 2)->default(0);

            $table->decimal('diamond_roi_income', 15, 2)->default(0);
            $table->decimal('diamond_level_income', 15, 2)->default(0);
            $table->decimal('bdb_income', 15, 2)->default(0);

            $table->decimal('product_wallet', 15, 2)->default(0);
            $table->decimal('gsbp', 15, 2)->default(0);

            $table->decimal('gold_roi_income', 15, 2)->default(0);
            $table->decimal('silver_roi_income', 15, 2)->default(0);

            $table->decimal('total_investment', 15, 2)->default(0);
            $table->decimal('total_income', 15, 2)->default(0);

            $table->timestamps();
        });
    }

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