
PK 
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateWalletsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('wallets', function (Blueprint $table) {
$table->increments('id')->unsigned();
$table->integer('user_id')->unsigned()->default(0);
$table->double('wallet_credit_amount', 8, 2)->default(0);
$table->double('wallet_debit_amount', 8, 2)->default(0);
$table->double('wallet_balance_amount', 8, 2)->default(0);
$table->string('wallet_txnid')->default('');
$table->string('wallet_refrenceid')->default('');
$table->tinyInteger('wallet_status')->unsigned()->default(0)->comment('1:byReturn;2:byCancel;3:byAdminAdded;4:byUser');
$table->integer('addedby')->unsigned()->default(0);
$table->tinyInteger('isactive')->unsigned()->default(1)->comment('0:inactive;1:active');
$table->tinyInteger('isapproved')->unsigned()->default(1)->comment('1:pending;2:clear');
$table->tinyInteger('isdelete')->unsigned()->default(1)->comment('0:isdelete;1:active');
$table->timestamps();
$table->softDeletes();
$table->ipAddress('visitor');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('wallets');
}
}


PK 99