<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    public function up(): void
    {
        Schema::table('inventory_orders', function (Blueprint $table) {
            $table->integer('returned_quantity')->default(0)->after('received_quantity');
            $table->timestamp('returned_at')->nullable()->after('returned_quantity');
        });
    }

    public function down(): void
    {
        Schema::table('inventory_orders', function (Blueprint $table) {
            $table->dropColumn(['returned_quantity', 'returned_at']);
        });
    }
};
