<?php

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

class CreateProductsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        /*
         *
    	'name', // 产品名称
		'info', // 产品信息
        'price', // 产品价格
        'classify', // 产品分类
        'color', // 产品颜色款色
        'collect_num', // 收藏数
        'sell_num', // 销量
		'status', // 产品状态, 上架/下架
         */
        Schema::create('products', function (Blueprint $table) {
            $table->increments('id');
            $table->timestamps();
            $table->string('name');
            $table->string('classify');
            $table->string('color');
            $table->text('info');
            $table->double('price');
            $table->integer('status');
            $table->integer('collect_num');
            $table->integer('sell_num');
            $table->string('photo');
            $table->integer('show');
        });
    }

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