<?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('page_contents', function (Blueprint $table) {
            $table->id();
            $table->unsignedInteger('page_id'); // Sayfa ile ilişkilendirilecek
            $table->string('title'); // İçerik başlığı
            $table->text('content'); // İçerik
            $table->string('seo_title')->nullable(); // SEO başlığı
            $table->text('seo_description')->nullable(); // SEO açıklaması
            $table->string('seo_keywords')->nullable(); // SEO anahtar kelimeler
            $table->string('language', 5); // Dil kodu (örn: 'en')
            $table->string('slug')->unique(); // SEO dostu URL
            $table->timestamps();
        });
    }

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