<?php

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

/**
 * Migration auto-generated by Sequel Pro Laravel Export
 * @see https://github.com/cviebrock/sequel-pro-laravel-export
 */
class CreateS1GoodscateInfoTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('s1_goods_cate', function (Blueprint $table) {
            $table->increments('id');
            $table->string('appid')->comment('app_id')->default(0);
            $table->string('name', 100)->comment('分类名称');
            $table->integer('pid')->comment('父类ID默认0，顶级分类');
            $table->string('pic', 255)->default('/wechat/images/icon_wx.png')->comment('分类图标');
            $table->unsignedTinyInteger('status')->default(1);
            $table->unsignedTinyInteger('sort');
            $table->unsignedTinyInteger('type_id')->default(1)->comment('1商品 2首页');
            $table->nullableTimestamps();
            $table->softDeletes();
        });
    }

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