<?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('settings', function (Blueprint $table) {
            $table->id();

            // Basic System Information
            $table->string('site_name')->default('Laravel Application');
            $table->string('site_title')->nullable();
            $table->text('site_description')->nullable();
            $table->text('site_keywords')->nullable();

            // Contact Information
            $table->string('admin_email')->nullable();
            $table->string('phone')->nullable();
            $table->string('fax')->nullable();

            // SEO & Analytics
            $table->text('gtm_code')->nullable(); // Google Tag Manager code

            // Media Assets
            $table->string('favicon')->nullable();
            $table->string('logo')->nullable();

            // Additional Settings (JSON for flexibility)
            $table->json('additional_settings')->nullable();

            $table->timestamps();
        });
    }

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