CreatePayuTransactionsTable   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 4
dl 0
loc 21
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A up() 0 18 1
1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Support\Facades\Schema;
6
7
class CreatePayuTransactionsTable extends Migration
8
{
9
    public function up()
10
    {
11
        Schema::create('payu_transactions', function (Blueprint $table) {
12
            $table->id();
13
            $table->unsignedBigInteger('paid_for_id')->nullable();
14
            $table->string('paid_for_type')->nullable();
15
            $table->string('transaction_id')->unique();
16
            $table->text('gateway');
17
            $table->text('body');
18
            $table->string('destination');
19
            $table->text('hash');
20
            $table->text('response')->nullable();
21
            $table->enum('status', ['pending', 'failed', 'successful', 'invalid'])->default('pending')->index();
22
            $table->timestamp('verified_at')->nullable()->index();
23
            $table->softDeletes();
24
            $table->timestamps();
25
        });
26
    }
27
}
28