id(); $table->string('transaction_code')->unique(); $table->foreignId('user_id')->constrained()->onDelete('cascade'); $table->foreignId('reservasi_id')->nullable()->constrained('reservasi')->onDelete('set null'); $table->decimal('total_amount', 10, 2); $table->decimal('final_amount', 10, 2); $table->enum('status', ['pending', 'paid', 'cancelled'])->default('pending'); $table->enum('payment_method', ['cash', 'transfer', 'qris'])->nullable(); $table->string('payment_proof')->nullable(); $table->timestamp('paid_at')->nullable(); $table->text('notes')->nullable(); $table->timestamps(); }); } public function down() { Schema::dropIfExists('transaksi'); } };