<?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('warehouse_transfer_masters', function (Blueprint $table) {
            $table->id();
            $table->string('date');
            $table->foreignId('from_warehouse_id')->constrained('warehouses')->onDelete('cascade');
            $table->foreignId('to_warehouse_id')->constrained('warehouses')->onDelete('cascade');
            $table->unsignedBigInteger('transition_location_id')->nullable(); // or whatever default
            $table->unsignedBigInteger('transition_create_by')->nullable(); // user ID
            $table->unsignedBigInteger('transition_update_by')->nullable(); // user
            $table->timestamps();
        });
    }

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