<?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('alternatif_solusi', function (Blueprint $table) {
            $table->id();

            $table->foreignId('case_study_id')
                ->constrained()
                ->cascadeOnDelete();

            $table->string('label');
            $table->string('pertanyaan_a');
            $table->string('pertanyaan_b');
            $table->string('pertanyaan_c');
            $table->string('pertanyaan_d');

            $table->integer('score_a');
            $table->integer('score_b');
            $table->integer('score_c');
            $table->integer('score_d');

            $table->text('feedback_benar')->nullable();
            $table->text('feedback_salah')->nullable();

            $table->string('mulai')->nullable();
            $table->string('selesai')->nullable();

            $table->timestamps();
        });
    }

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