<?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('bio_time_devices', function (Blueprint $table) {
            $table->id();
            $table->string('sn')->unique(); // Serial Number
            $table->string('alias')->nullable(); // Device Name
            $table->string('ip_address')->nullable();
            $table->string('device_model')->nullable();
            $table->dateTime('last_activity')->nullable();
            $table->string('status')->default('offline'); // online, offline
            $table->boolean('is_active')->default(true);
            $table->timestamps();
        });
    }

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