<?php

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

class CreateFurnitureGoodsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('furniture_goods', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name',255)->comment('产品名称');
            $table->string('img',255)->comment('产品图片');
            $table->integer('category_id')->comment('产品分类');
            $table->text('detail')->comment('产品详情');
            $table->integer('sort')->comment('排序，越大越靠前');
            $table->tinyInteger('status')->comment('状态：1:激活；0：未激活');

            $table->softDeletes();
            $table->timestamps();
        });
    }

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