id(); $table->foreignId('pos_sale_id')->constrained('pos_sales')->cascadeOnDelete(); $table->string('owner_ref')->index(); $table->unsignedInteger('amount_minor'); $table->string('method')->default('cash'); // cash | pay $table->string('status')->default('pending'); // pending | paid | failed $table->unsignedBigInteger('pay_order_id')->nullable(); $table->string('payment_reference')->nullable()->index(); $table->timestamp('paid_at')->nullable(); $table->timestamps(); }); } public function down(): void { Schema::dropIfExists('pos_payments'); } };