<?php

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

class CreateCommentsInfoTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('comments_info', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('interaction_id')->comment('梦想动态ID');
            $table->integer('user_id')->comment('评价用户');
            $table->tinyInteger('level')->default(0)->comment('评论星级');
            $table->text('content')->comment('评论内容');
            $table->timestamps();
            $table->softDeletes();
        });
    }

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