<?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('exercises', function (Blueprint $table) {
            $table->id();
            $table->bigInteger('exercise_number');
            $table->string('title');
            $table->text('content'); // Editor de texto CKEditor
            $table->foreignId('chapter_id')->constrained('chapters');
            $table->enum('type', ['input', 'radio', 'checkbox']);
        });
    }

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