<?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('slides', function (Blueprint $table) {
            $table->id();
            $table->json('title'); // {en: string, km: string}
            $table->json('subtitle')->nullable(); // {en: string, km: string}
            $table->string('background_image')->nullable();
            $table->json('cta_text')->nullable(); // {en: string, km: string}
            $table->string('cta_link')->nullable();
            $table->integer('order')->default(0);
            $table->string('status')->default('active'); // 'active' or 'inactive'
            $table->timestamps();
        });
    }

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