<?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()
    {
        Schema::create('absen_manuals', function (Blueprint $table) {
            $table->id();
            // foreign key terhubung ke id di tabel siswas Anda (Hanya untuk siswa)
            $table->foreignId('siswa_id')->constrained('siswas')->onDelete('cascade');
            $table->date('tanggal'); // Mencatat tanggal keliling kelas
            $table->string('status_kehadiran'); // Isinya: Sakit, Izin, atau Alfa
            $table->timestamps();
        });
    }

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