<?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('refine_settings', function (Blueprint $table) {
            $table->id();
            $table->string('log_path')->default('/home/logs/world2.log');
            $table->string('webhook_url')->nullable();
            $table->boolean('broadcast_enabled')->default(false);
            $table->integer('broadcast_channel')->default(9);
            $table->boolean('is_enabled')->default(false);
            $table->string('filter_mode')->default('all');
            $table->json('enabled_results')->nullable();
            $table->boolean('discord_enabled')->default(false);
            $table->string('discord_filter_mode')->default('all');
            $table->json('discord_enabled_results')->nullable();
            $table->timestamps();
        });
    }

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