<?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::table('borrow_requests', function (Blueprint $table) {
            // Kolom untuk mencatat kondisi saat pengembalian
            $table->string('return_condition')->nullable(); // baik, rusak_ringan, rusak_berat
            $table->text('return_notes')->nullable(); // Catatan pengembalian dari user/admin
            $table->timestamp('actual_return_date')->nullable(); // Tanggal real pengembalian
        });
    }

    public function down()
    {
        Schema::table('borrow_requests', function (Blueprint $table) {
            $table->dropColumn(['return_condition', 'return_notes', 'actual_return_date']);
        });
    }
};
