<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Ramsey\Uuid\Uuid;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('users', function (Blueprint $table) {
            $table->id();
            //$table->uuid()->nullable()->unique()->default(Uuid::uuid4());
            $table->foreignId('contract_rid')->nullable();
            $table->string('name');
            $table->string('email')->unique();
            $table->timestamp('email_verified_at')->nullable();
            $table->string('password');
            $table->string('advan', 2)->nullable();
            $table->string('modified_by')->nullable();
            $table->string('created_by')->nullable();
            $table->integer('status_l')->nullable();
            $table->integer('main_user')->nullable()->default(0);
            $table->string('session_id')->nullable();
            $table->integer('new_iprs')->nullable()->default(0);
            $table->date('date_pass')->nullable();
            $table->date('date_action')->nullable();
            $table->string('document_number')->nullable();
            $table->rememberToken();
            $table->softDeletes();
            $table->timestamps();
        });
    }

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