<?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('input_berkas', function (Blueprint $table) {
            $table->id();
            $table->integer('nim_mhs');
            $table->String('nama_mhs');
            $table->foreignId('fakultas_id')->constrained()->onDelete('cascade')->nullable();
            $table->foreignId('program_studi_id')->constrained()->onDelete('cascade')->nullable();
            $table->foreignId('jenis_surat')->constrained()->onDelete('cascade')->nullable();
            $table->Date('tgl_surat');
            $table->String('no_surat');
            $table->String('status');
            $table->String('upload_berkas')->nullable();
            $table->Longtext('komen');
            $table->timestamps();
            $table->softDeletes();
        });
    }

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