<?php

use Server\Database\Migrations\ParentMigration;
use Illuminate\Database\Schema\Blueprint;

class CreateWithdrawalsTable extends ParentMigration
{

    public function up()
    {
        $this->schema->create('withdrawals', function (Blueprint $table) {

            $table->increments('id');

            $table->integer('user_id');

            $table->string('ssn')->nullable();

            $table->enum('status', ['Pending', 'Completed', 'Failed'])->default('Pending');

            $table->string('currency');

            $table->float('amount');

            $table->string('payment_method');

            $table->integer('from');

            $table->string('wallet_address')->nullable();

            $table->string('paypal_email')->nullable();

            $table->string('bank_name')->nullable();

            $table->string('account_name')->nullable();

            $table->string('account_number')->nullable();

            $table->string('routing_number')->nullable();

            $table->string('updated_at_month')->nullable();

            $table->string('updated_at_day')->nullable();

            $table->timestamps();
        });
    }

    public function down()
    {
        $this->schema->drop('withdrawals');
    }
}