<?php

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

return new class extends Migration
{
    public function up(): void
    {
        Schema::create('routers', function (Blueprint $table) {
            $table->id();
            $table->string('name');
            $table->string('ip_address');
            $table->string('model')->default('CCR1036-12G-4S');
            $table->string('os_version')->default('v7.12.1');
            $table->string('location')->default('Central POP');
            $table->string('status')->default('Online'); // Online, Offline, Warning
            $table->integer('cpu_usage')->default(15);
            $table->integer('active_sessions')->default(0);
            $table->timestamp('last_seen')->nullable();
            $table->timestamps();
        });
    }

    public function down(): void
    {
        Schema::dropIfExists('routers');
    }
};
