increments('id')->comment('支付记录ID'); $table->string('payment_no', 32)->unique()->comment('支付单号'); $table->integer('store_id')->comment('门店ID'); $table->integer('user_id')->default(0)->comment('提交人(小程序用户ID)'); $table->decimal('amount', 10, 2)->default(0)->comment('支付金额(= 关联账单总金额合计,提交时快照)'); $table->integer('pay_method')->comment('支付方式(1微信 2支付宝 3对公汇款)'); $table->string('voucher_ids', 255)->default('')->comment('汇款凭证图片ID(逗号分隔)'); $table->integer('status')->default(0)->comment('状态(0待审核 1已通过 2已拒绝)'); $table->string('remark', 255)->default('')->comment('门店备注'); $table->timestamp('audited_at')->nullable()->comment('审核时间'); $table->integer('auditor_id')->default(0)->comment('审核人(后台系统用户ID)'); $table->string('audit_remark', 255)->default('')->comment('审核备注(拒绝原因)'); $table->timestamps(); $table->index(['store_id', 'status'], 'payment_store_status_index'); $table->comment('支付记录表(小程序合并付款,后台审核汇款凭证)'); }); } } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('payment'); } };