<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreatePaymentOnlineTransactionsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('payment_online_transactions', function (Blueprint $table) {
            $table->increments('id');
            $table->string('phone');
            $table->string('merchant_code');
            $table->string('transaction_no');
            $table->string('bank_code');
            $table->date('pay_date')->nullable();
            $table->text('payload')->nullable();
            $table->decimal('amount', 10, 2);
            $table->timestamps();
        });
    }

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