First Commit

This commit is contained in:
marco
2026-09-01 07:49:48 -03:00
commit 28b1044038
399 changed files with 41659 additions and 0 deletions
@@ -0,0 +1,32 @@
<?php
declare(strict_types=1);
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::create('invoices', function (Blueprint $table) {
$table->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');
}
};