feat(Reminder process): add 4 reminder phases for membership (Retzien)
All checks were successful
Deploy Roxane to Preprod / deploy (push) Successful in 1m21s

This commit is contained in:
2026-09-06 17:03:14 +02:00
parent 98893924ac
commit ba11ee7120
61 changed files with 967 additions and 162 deletions

View File

@@ -29,7 +29,7 @@ return new class extends Migration
'valid',
'pending',
'cancelled',
'excluded'
'excluded',
])->default('draft');
// Nature

View File

@@ -15,7 +15,7 @@ return new class extends Migration
$table->id();
$table->foreignId('service_id')->constrained('services')->onDelete('cascade');
$table->foreignId('membership_id')->constrained('memberships')->onDelete('cascade');
//$table->json('data')->nullable();
// $table->json('data')->nullable();
$table->timestamps();
});
}

View File

@@ -0,0 +1,36 @@
<?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('member_renewal_reminders', function (Blueprint $table) {
$table->id();
$table->foreignId('member_id')->constrained('members')->onDelete('cascade');
$table->year('renewal_year');
$table->boolean('reminder_1_sent')->default(false);
$table->boolean('reminder_2_sent')->default(false);
$table->boolean('reminder_3_sent')->default(false);
$table->boolean('deactivation_sent')->default(false);
$table->timestamp('reminder_1_sent_at')->nullable();
$table->timestamp('reminder_2_sent_at')->nullable();
$table->timestamp('reminder_3_sent_at')->nullable();
$table->timestamp('deactivated_at')->nullable();
$table->timestamps();
$table->unique(['member_id', 'renewal_year']);
});
}
public function down(): void
{
Schema::dropIfExists('member_renewal_reminders');
}
};