<?php

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

/**
 * Migration auto-generated by Sequel Pro Laravel Export
 * @see https://github.com/cviebrock/sequel-pro-laravel-export
 */
class CreateUserCashOutTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('user_cash_out', function (Blueprint $table) {
            $table->increments('id')->comment('提现记录id');
            $table->unsignedInteger('user_id')->comment('提现用户id');
            $table->unsignedInteger('bank_id')->comment('绑定的提现方式id');
            $table->string('type')->comment('提现类型');
            $table->string('account')->comment('提现账号');
            $table->string('name')->comment('账号姓名');
            $table->decimal('cash', 8, 2)->comment('提现金额');
            $table->text('comments')->nullable()->comment('审核未通过原因, 备注等');
            $table->tinyInteger('status')->default(0)->comment('提现状态: 1, 申请提现; 2,已打款; 3,审核未通过');
            $table->nullableTimestamps();
        });
    }

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