<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateGoodsSnapshot extends Migration { public function up() { Schema::create('goods_snapshot', function (Blueprint $onV5E) { $onV5E->increments('id'); $onV5E->timestamps(); $onV5E->timestamp('goodsUpdatedTime')->nullable()->comment('商品更新时间'); $onV5E->timestamp('specUpdatedTime')->nullable()->comment('规格更新时间'); $onV5E->timestamp('attrUpdatedTime')->nullable()->comment('属性更新时间'); $onV5E->timestamp('contentUpdatedTime')->nullable()->comment('详细内容更新时间'); $onV5E->integer('goodsId')->nullable()->comment('商品ID'); $onV5E->integer('categoryId')->nullable()->comment('分类ID'); $onV5E->string('title', 200)->nullable()->comment('商品名称'); $onV5E->decimal('price', 20, 2)->nullable()->comment('价格'); $onV5E->decimal('marketPrice', 20, 2)->nullable()->comment('划线价'); $onV5E->decimal('shippingPrice', 20, 2)->nullable()->comment('运费'); $onV5E->string('cover', 200)->nullable()->comment('封面'); $onV5E->tinyInteger('isVirtual')->nullable()->comment('虚拟商品'); $onV5E->string('specSpec', 200)->nullable()->comment('规格组合'); $onV5E->decimal('specPrice', 20, 2)->nullable()->comment('价格'); $onV5E->decimal('specMarketPrice', 20, 2)->nullable()->comment('划线价'); $onV5E->string('specCover', 200)->nullable()->comment('封面'); $onV5E->text('attrData')->nullable()->comment('属性'); $onV5E->string('detailImages', 2000)->nullable()->comment('图片'); $onV5E->text('detailContent')->nullable()->comment('描述'); $onV5E->index('goodsId'); }); } public function down() { } }