<?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('sliders', function (Blueprint $table) {
            $table->id();
            $table->string('title');
            $table->string('image_source')->default('upload'); // upload or url
            $table->string('image_path')->nullable();
            $table->string('image_filename')->nullable();
            $table->integer('image_size')->nullable();
            $table->string('image_mime_type')->nullable();
            $table->string('status')->default('published'); // published, draft
            $table->integer('order')->default(0);
            $table->timestamps();
            $table->softDeletes();
        });
    }

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