<?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::create('import_request_items', function (Blueprint $table) {
        $table->id();
        $table->unsignedBigInteger('import_request_id');

        $table->string('item_description');
        $table->integer('quantity');
        $table->string('uom');
        $table->decimal('per_item_value', 10, 2);
        $table->decimal('per_item_weight', 10, 2);
        $table->string('currency');
        $table->string('country_of_origin');

        $table->timestamps();

        $table->foreign('import_request_id')->references('id')->on('import_requests')->onDelete('cascade');
    });
}


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