<?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('purchase_maker_masters', function (Blueprint $table) {
            $table->id();
            $table->string('total_product')->nullable();
            $table->string('po_date');
            $table->string('po_no');
            $table->string('created_by');
            $table->string('updated_by')->nullable();
            $table->string('shop_id')->nullable();
            $table->unsignedBigInteger('supplier_id')->nullable();
            $table->string('total')->nullable();
            $table->string('status')->default(0);
            $table->unsignedBigInteger('transition_location_id')->nullable(); // or whatever default
            $table->unsignedBigInteger('transition_create_by')->nullable(); // user ID
            $table->unsignedBigInteger('transition_update_by')->nullable(); // user ID
            $table->timestamps();
        });
    }

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