<?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('letters', function (Blueprint $table) {
            $table->uuid('id')->primary();
            // $table->string('nomor_surat');
            $table->string('nama_mahasiswa');
            $table->string('nomor_induk_mahasiswa');
            $table->string('program_studi_mahasiswa');
            $table->string('tahun_ajaran');
            $table->date('start_date');
            $table->date('completion_date')->nullable();
            $table->string('lampiran')->nullable();
            $table->boolean('is_acceptance')->default(false);
            $table->string('nomor_surat_acceptance')->nullable();
            $table->boolean('is_completion')->default(false);
            $table->string('nomor_surat_completion')->nullable();
            $table->timestamps();
        });
    }

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