<?php

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

class CreatePartnerWalletsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('partner_wallets', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('partner_id')->comment('合伙人id');
            $table->decimal('balance',7,2)->comment('余额');
            $table->decimal('frozen_amount',7,2)->comment('冻结金额');
            $table->decimal('withdrawn_amount',7,2)->comment('提现中金额');
            $table->timestamps();

            $table->comment('合伙人-钱包表');
        });
    }

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