<?php

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

class CreateAlbumProduct extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('album_product', function (Blueprint $table) {
            $table->increments('id');
            $table->unsignedInteger('store_id');
            $table->unsignedInteger('cat_id')->comment('分类ID');
            $table->longText('attr')->comment('规格 json字符串');
            $table->string('style',255)->comment('风格');
            $table->unsignedInteger('sort')->comment('排序');
            $table->string('cover_pic',255)->comment('封面图片');
            $table->unsignedInteger('hot_cake')->default(0)->comment('是否促销 0不是 1是');
            $table->unsignedInteger('news')->default(0)->comment('最新上市 0不是 1是');
            $table->longText('detail')->comment('产品详情');
            $table->unsignedInteger('is_delete')->default(0)->comment('Is_delete');
            $table->timestamps();
        });
    }

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