bigIncrements('id'); $table->string('title'); $table->string('img_url')->nullable()->comment('商品图片'); $table->unsignedBigInteger('type_id')->comment('商品种类id'); $table->unsignedBigInteger('brand_id')->nullable()->comment('商品品牌id'); $table->string('goods_code', 32)->unique()->comment('商品编码'); $table->timestamps(); // 索引 }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('goods'); } }