<?php

use Carbon\Carbon;
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('users', function (Blueprint $table) {
            $table->id();
            $table->enum('role', ['admin', 'user']);
            $table->string('mobile');
            $table->string('password');
            $table->string('password_show');
            $table->float('amount')->default(0);
            $table->string('owncode');
            $table->string('rcode')->nullable();
            $table->string('state')->nullable();
            $table->string('city')->nullable();
            $table->string('aviator_game_url')->nullable()->default(NULL);
            $table->string('address')->nullable();
            $table->integer('status')->default(1);
            $table->timestamp('created_at')->default(Carbon::now());
            $table->timestamp('updated_at')->default(Carbon::now());
        });
    }

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