<?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('prestamos', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('numOperacion')->nullable();
            $table->string('codigo', 50)->nullable();
            $table->integer('cantidad')->nullable();
            $table->tinyInteger('status')->nullable();
            $table->string('cedulaSolicita', 20)->nullable();
            $table->string('cedulaDespacha', 20)->nullable();
            $table->string('cedulaAutoriza', 20)->nullable();
            $table->dateTime('fechaEntrega')->nullable();
            $table->dateTime('fechaDevolucion')->nullable();
            $table->string('cedulaRecibeDev', 20)->nullable();
            $table->string('ubicacion', 100);
            $table->text('observacion')->nullable();
        });
    }

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