id(); // // FK pro usuário (driver) // $table->foreignId('user_id')->constrained()->cascadeOnDelete(); // // Identificadores // $table->string('mp_payment_id')->nullable()->unique()->index(); // $table->string('external_reference')->unique()->index(); // // Dados do pagamento // $table->decimal('amount', 10, 2); // $table->string('method'); // pix | credit_card | debit_card // $table->string('status')->default('pending'); // pending | approved | rejected | cancelled | expired // $table->string('status_detail')->nullable(); // $table->unsignedTinyInteger('installments')->default(1); // // Dados do PIX (quando aplicável) // $table->text('pix_qr_code')->nullable(); // $table->longText('pix_qr_code_base64')->nullable(); // $table->string('pix_ticket_url')->nullable(); // $table->timestamp('expires_at')->nullable(); // $table->timestamp('approved_at')->nullable(); // $table->timestamps(); // $table->index(['user_id', 'status']); // }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('table_payments'); } };