<?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('uplink_payments', function (Blueprint $table) {
            $table->id();
            $table->unsignedBigInteger('payer_user_id')->nullable();
            $table->foreign('payer_user_id')->references('id')->on('users');
            $table->unsignedBigInteger('receiver_user_id')->nullable();
            $table->foreign('receiver_user_id')->references('id')->on('users');
            $table->integer('ammount')->nullable();
            $table->text('screen_short')->nullable();
            $table->string('utr_no')->nullable();
            $table->boolean('status')->default(false)->comment('1=>approve, 2=>reject, 3=>pending,');
            $table->dateTime('payment_status_confirmed_at')->nullable();
            $table->timestamps();
        });
    }

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