<?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('penilaian_rapots', function (Blueprint $table) {
            $table->id();
            $table->foreignId('siswa_id')->constrained('siswas')->onDelete('cascade');
            $table->string('semester');
            $table->string('tahun_ajaran');
            $table->text('catatan_guru')->nullable();
            $table->string('nama_guru')->nullable();
            $table->json('nilai_aspek'); // Untuk menyimpan skor 6 aspek PAUD
            $table->timestamps();
        });
    }

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