<?php

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

class CreateBounsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('bouns', function (Blueprint $table) {
            $table->id();
            $table->timestamp('date')->nullable()->comment('分红时间');
            $table->string('type', 20)->comment('分红类别');
            $table->unsignedDecimal('total', 12, 2)->default(0)->comment('分红累计金额');
            $table->boolean('status')->default(0)->comment('分红状态');
            $table->text('source')->nullable()->comment('数组源信息');
            $table->timestamps();
        });
    }

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