<?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('users', function (Blueprint $table) {
            $table->id();
            $table->text('session_id')->nullable();
            $table->string('nama', 150);
            $table->string('username')->unique();
            $table->string('password', 150);
            $table->string('previlage', 150)->nullable();
            $table->string('api_token', 150)->nullable();
            $table->string('tandatangan', 150)->nullable();
            $table->string('photo', 150)->nullable();
            $table->text('firebase')->nullable();
            $table->integer('active_status')->nullable();
            $table->timestamp('last_activity')->nullable();
            $table->rememberToken();
            $table->timestamp('created_at')->useCurrent();
            $table->timestamp('updated_at')->useCurrent();
        });
    }

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