<?php

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

class CreateCommentsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        /*
         *
        'wechat_id', // wechat
        'order_type', // 订单类型
        'order_id', // 订单id
        'title', // 评论标题
        'content', // 评论内容
        'show' // 是否可视0, 1
         *
         */
        Schema::create('comments', function (Blueprint $table) {
            $table->increments('id');
            $table->string('wechat_id');
            $table->string('order_type');
            $table->string('order_id');
            $table->string('title');
            $table->string('content');
            $table->integer('show');
            $table->timestamps();
        });
    }

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