id(); $table->foreignId('user_id')->constrained()->cascadeOnDelete(); $table->foreignId('user_subscription_id')->constrained()->cascadeOnDelete(); $table->string('invoice_number')->unique(); $table->decimal('amount', 10, 2); $table->string('currency', 3)->default('BRL'); $table->string('status')->default('pending'); // pending, paid, cancelled, refunded $table->string('payment_method')->nullable(); $table->timestamp('paid_at')->nullable(); $table->string('pdf_path')->nullable(); $table->timestamps(); }); } public function down(): void { Schema::dropIfExists('invoices'); } };