id(); $table->unsignedBigInteger('user_id')->comment('用户ID'); $table->unsignedBigInteger('goods_id')->comment('商品ID'); $table->unsignedBigInteger('merchant_id')->nullable()->comment('店铺 ID'); $table->string('goods_name'); $table->string('goods_sn')->nullable(); $table->string('goods_sku_sn')->nullable(); $table->unsignedBigInteger('goods_sku_id')->nullable()->comment('商品sku ID'); $table->string('cover_image')->nullable()->comment('封面图'); $table->decimal('price', 12, 2)->comment('售价'); $table->decimal('vip_price', 12, 2)->comment('售价'); $table->json('attr')->nullable()->comment('属性'); $table->json('spec')->nullable()->comment('规格'); $table->json('part')->nullable()->comment('配件'); $table->unsignedInteger('amount')->comment('数量'); $table->timestamps(); $table->comment('购物车'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('goods_cart'); } };