<?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('pages', function (Blueprint $table) {
            $table->id();
            $table->string('title'); // Judul halaman (Contoh: Syarat & Ketentuan)
            $table->string('slug')->unique(); // URL ramah (Contoh: syarat-dan-ketentuan)
            $table->longText('content')->nullable(); // Isi teks/HTML lengkapnya
            $table->boolean('is_active')->default(true); // Saklar untuk menyalakan/mematikan halaman
            $table->timestamps();
        });
    }

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