<?php

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

class CreateDreamInfoTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('dream_info', function (Blueprint $table) {
            $table->increments('id')->comment('id');
            $table->integer('user_id')->comment('用户ID');
            $table->string('name',20)->comment('梦想名称');
            $table->text('about')->comment('梦想介绍');
            $table->integer('coin')->default(0)->comment('所需梦想币');
            $table->integer('time')->default(0)->comment('梦想倒计时');
            $table->integer('get_coin')->default(0)->comment('获得梦想币');
            $table->integer('mark')->default(0)->comment('梦想分');
            $table->tinyInteger('status')->default(0)->comment('梦想状态');
            $table->string('video')->comment('梦想视频地址')->nullable();
            $table->integer('score')->comment('梦想排行分数')->default(0);
            $table->string('sign')->comment('梦想标签')->default('');
            $table->timestamps();
            $table->softDeletes();
        });
    }

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