New SEPA logic

This commit is contained in:
2026-06-21 01:28:28 +02:00
parent e9aa66a860
commit 63c7b8dfb1
8 changed files with 318 additions and 35 deletions
@@ -0,0 +1,31 @@
<?php
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('sepa_payment_elements', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->string('tenant');
$table->foreignId('invoice_id')->constrained('invoices', 'id')->restrictOnDelete()->cascadeOnUpdate();
$table->foreignId('cost_unit_id')->constrained('cost_units', 'id')->restrictOnDelete()->cascadeOnUpdate();
$table->float('amount', 2);
$table->string('recipient_name');
$table->string('recipient_iban');
$table->string('payment_purpose');
$table->boolean('exported')->default(false);
$table->dateTime('exported_at')->nullable();
$table->foreign('tenant')->references('slug')->on('tenants')->restrictOnDelete()->cascadeOnUpdate();
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('sepa_payment_elements');
}
};