<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateGoods extends Migration { public function up() { Schema::create('goods', function (Blueprint $onV5E) { $onV5E->increments('id'); $onV5E->timestamps(); $onV5E->integer('categoryId')->nullable()->comment('分类ID'); $onV5E->string('title', 200)->nullable()->comment('商品名称'); $onV5E->string('slogan', 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->integer('stock')->nullable()->comment('库存'); $onV5E->tinyInteger('saleStatus')->nullable()->comment('上架状态'); $onV5E->tinyInteger('isVisible')->nullable()->comment('显示'); $onV5E->string('cover', 200)->nullable()->comment('封面'); $onV5E->tinyInteger('isVirtual')->nullable()->comment('虚拟商品'); $onV5E->index('categoryId'); }); } public function down() { } }