comment('购物车表'); $table->id(); $table->integer('user_id')->index()->comment('用户ID'); $table->integer('drug_id')->index()->comment('药品ID'); $table->integer('store_id')->index()->comment('门店ID'); $table->mediumInteger('qty')->comment('数量'); $table->timestamp('join_at')->nullable()->comment('加入时间'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('carts'); } };