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

            $table->string('site_name')->default('Hisab Seba');
            $table->string('site_title')->nullable();
            $table->string('meta_title')->nullable();
            $table->text('meta_description')->nullable();
            $table->text('meta_keywords')->nullable();

            $table->string('canonical_url')->nullable();

            $table->string('og_title')->nullable();
            $table->text('og_description')->nullable();
            $table->string('og_image')->nullable();
            $table->string('twitter_card')->default('summary_large_image');

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

            $table->string('google_site_verification')->nullable();
            $table->string('bing_site_verification')->nullable();
            $table->string('yandex_verification')->nullable();
            $table->string('pinterest_verification')->nullable();
            $table->string('facebook_domain_verification')->nullable();

            $table->longText('robots_txt')->nullable();

            $table->boolean('index_public_pages')->default(true);
            $table->boolean('index_private_pages')->default(false);

            $table->boolean('enable_json_ld')->default(true);
            $table->boolean('enable_og_tags')->default(true);
            $table->boolean('enable_twitter_tags')->default(true);

            $table->string('business_type')->nullable()->default('AccountingSoftwareApplication');
            $table->string('support_email')->nullable();
            $table->string('support_phone')->nullable();
            $table->string('address')->nullable();

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

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