<?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('diamond_accounts', function (Blueprint $table) {
            $table->id();
            $table->string('user_id', 20)->nullable();
            $table->datetime('entry_date');
            $table->float('credit', 15, 2)->default(0);
            $table->float('debit', 15, 2)->default(0);
            $table->float('product_wallet', 15, 2);
            $table->string('type', 15)->default('ROI');
            $table->integer('level');
            $table->string('remark');
            $table->string('description')->nullable();
            $table->float('pre', 10, 2)->default(0);
            $table->integer('inv_id')->nullable();
            $table->timestamps();
        });
    }

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