Refundings without contacting the participant

This commit is contained in:
2026-09-03 23:36:21 +02:00
parent efee20c16b
commit 5beb2b1d97
16 changed files with 723 additions and 37 deletions
@@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
/**
* Hält fest, wer die Bankverbindung erfasst hat.
*
* `null` heißt: der Teili hat sie selbst über den Token-Link eingetragen und dabei die Erklärung
* angekreuzt. Ist die Spalte gesetzt, hat die Aktionsleitung die Angaben aufgenommen, weil sie ihr schon
* vorlagen -- der Beleg weist das dann samt Namen aus, damit niemand die Erklärung für eine Bestätigung
* des Teilis hält.
*
* Kein zusätzliches `captured_at`: Der Zeitpunkt ist `accepted_at`, der in diesem Fall mit der Freigabe
* zusammenfällt.
*/
return new class extends Migration {
public function up(): void
{
Schema::table('participant_refunds', function (Blueprint $table) {
$table->foreignId('captured_by')->nullable()->after('account_iban')
->constrained('users', 'id')->nullOnDelete()->cascadeOnUpdate();
});
}
public function down(): void
{
Schema::table('participant_refunds', function (Blueprint $table) {
$table->dropForeign(['captured_by']);
$table->dropColumn('captured_by');
});
}
};