<?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('question_translations', function (Blueprint $table) {
            $table->id();
            $table->morphs('questionable');
            $table->string('locale');
            $table->longText('question_text'); // text, video, image
            $table->string('slug')->unique();
            $table->text('question_explanation')->nullable();  // text, video, image, nullable
            $table->longText('answer_explanation')->nullable();
            $table->longText('hints')->nullable(); // string
        });
    }

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