<?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('movements', function (Blueprint $table) {
            $table->id();
            $table->foreignId('approval_id')->constrained()->cascadeOnDelete();
            $table->string('number')->nullable();
            $table->date('date')->nullable();
            $table->string('customs_certificate_number')->nullable();
            $table->date('customs_certificate_date')->nullable();
            $table->decimal('qty', 20, 5)->nullable();
            $table->decimal('value_usd', 20, 5)->nullable();


            $table->timestamps();
        });
    }

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