<?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('pbtpay_transaksis', function (Blueprint $table) {
            $table->id();
            $table->integer('pbtpay_bil_id');
            $table->double('user_id');
            $table->enum('status_transaksi',['baru','inprogress','failed','pending','abort','approved'])->nullable();
            $table->integer('pm_status')->nullable();
            $table->string('pm_message')->nullable();
            $table->date('pm_pdate')->nullable();
            $table->integer('pm_clientid')->nullable();
            $table->integer('pm_clienttype')->nullable();
            $table->string('pm_paymethod')->nullable();
            $table->string('pm_paymodel')->nullable();
            $table->integer('pm_orderid')->nullable();
            $table->integer('pm_orderno')->nullable();
            $table->integer('pm_paytrxid')->nullable();
            $table->datetime('pm_paytrxtime')->nullable();
            $table->double('pm_paytrxamt')->nullable();
            $table->string('pm_paytrxbank')->nullable();
            $table->string('pm_buyername')->nullable();
            $table->string('pm_refno')->nullable();
            $table->integer('pm_count')->nullable();
            $table->string('pm_items')->nullable();
            $table->integer('pm_userid')->nullable();
            $table->string('pm_name')->nullable();
            $table->string('pm_email')->nullable();
            $table->string('pm_mobile')->nullable();
            $table->timestamps();
        });
    }

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