<?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 CreateUserBanksTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('user_banks', function (Blueprint $table) {
            $table->increments('id')->comment('绑定银行卡,支付方式的id');
            $table->unsignedInteger('user_id')->comment('关联用户id, users.id');
            $table->string('bank_name', 60)->comment('银行名称, 支付方式名称')->nullable();
            $table->string('bank_number', 120)->comment('银行卡号码, 支付宝帐号, 微信帐号')->nullable();
            $table->string('bank_phone', 120)->comment('银行卡 网上支付绑定的手机号')->nullable();
            $table->string('bank_user', 60)->comment('银行卡用户姓名')->nullable();
            $table->string('type',60)->comment('微信/支付宝')->nullable();
            $table->string('qrcode')->comment('二维码')->nullable();
            $table->timestamps();
            $table->softDeletes();
        });
    }

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