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

            // Main title and description
            $table->string('main_title')->nullable();
            $table->longText('main_description')->nullable();

            // Top image
            $table->string('top_image')->nullable();

            // Count items as JSON
            $table->json('count_items')->nullable();

            // Manual counts
            $table->integer('gallery_count')->nullable();
            $table->integer('news_count')->nullable();
            $table->integer('program_count')->nullable();
            // Bottom section
            $table->string('bottom_image')->nullable();
            $table->text('bottom_text')->nullable();

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

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