bigIncrements('id'); $table->string('order_no', 30)->comment('订单号'); $table->bigInteger('user_id')->default(0)->comment('用户id'); $table->bigInteger('bike_id')->default(0)->comment('车id'); $table->bigInteger('area_id')->default(0)->comment('区域id'); $table->timestamp('start_use_bike_time')->nullable()->comment('开始时间'); $table->timestamp('end_use_bike_time')->nullable()->comment('结束时间'); $table->integer('use_bike_time_length')->default(0)->comment('骑行时间(分)'); $table->integer('pause_bike_time_length')->default(0)->comment('暂停时间(分)'); $table->integer('use_bike_distance_length')->default(0)->comment('骑行距离(千米)'); $table->decimal('time_money', 7, 2)->default(0.00)->comment('时长费用'); $table->decimal('distance_money', 7, 2)->default(0.00)->comment('里程费用'); $table->decimal('pause_money', 7, 2)->default(0.00)->comment('停车费'); $table->decimal('dispatch_money', 7, 2)->default(0.00)->comment('调度费'); $table->decimal('preferential_money', 7, 2)->default(0.00)->comment('优惠金额'); $table->decimal('total_money', 7, 2)->default(0.00)->comment('总价格'); $table->tinyInteger('pay_status')->default(0)->comment('支付状态'); $table->decimal('pay_money', 7, 2)->default(0.00)->comment('支付金额'); $table->tinyInteger('pay_type')->default(0)->comment('支付方式(0:未支付;1已支付)'); $table->tinyInteger('status')->default(1); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('orders'); } }