CreateMpesaC2bCallbacksTable   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 0
Metric Value
dl 0
loc 41
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 4

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 23 1
A down() 0 4 1
1
<?php
2
3
use Illuminate\Support\Facades\Schema;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Database\Migrations\Migration;
6
7
class CreateMpesaC2bCallbacksTable extends Migration
8
{
9
    /**
10
     * Run the migrations.
11
     *
12
     * @return void
13
     */
14
    public function up()
15
    {
16
        Schema::create(
17
            'mpesa_c2b_callbacks',
18
            function (Blueprint $table) {
19
            $table->increments('id');
20
            $table->string('TransactionType');
21
            $table->string('TransID')->unique();
22
            $table->string('TransTime');
23
            $table->double('TransAmount', 10, 2);
24
            $table->integer('BusinessShortCode');
25
            $table->string('BillRefNumber');
26
            $table->string('InvoiceNumber')->nullable();
27
            $table->string('ThirdPartyTransID')->nullable();
28
            $table->double('OrgAccountBalance', 10, 2);
29
            $table->string('MSISDN');
30
            $table->string('FirstName')->nullable();
31
            $table->string('MiddleName')->nullable();
32
            $table->string('LastName')->nullable();
33
            $table->timestamps();
34
        }
35
        );
36
    }
37
38
    /**
39
     * Reverse the migrations.
40
     *
41
     * @return void
42
     */
43
    public function down()
44
    {
45
        Schema::dropIfExists('mpesa_c2b_callbacks');
46
    }
47
}
48