Newsletter-Listen: Empfaengerlisten filtern, speichern und exportieren
Admin-Bereich "Newsletter-Listen" (Plan dev/_tickets/entwicklungsplan- newsletter-listen.md): Berater und Kunden nach Filtern zusammenstellen, als Liste speichern und wieder laden, Export als XLSX/CSV. Jeder Export wird protokolliert (newsletter_list_exports). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
c568248046
commit
c858bd6ed0
26 changed files with 3664 additions and 0 deletions
|
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
/**
|
||||
* Gespeicherte Newsletter-Listen (Filterkombinationen) und das Protokoll
|
||||
* aller Exporte, damit nachvollziehbar bleibt, wer wann welche Adressen
|
||||
* exportiert hat.
|
||||
*/
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('newsletter_lists', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name', 120);
|
||||
$table->string('source', 20);
|
||||
$table->json('filters');
|
||||
$table->unsignedBigInteger('created_by')->nullable()->index();
|
||||
$table->timestamp('last_exported_at')->nullable();
|
||||
$table->unsignedInteger('last_row_count')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('newsletter_list_exports', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('newsletter_list_id')->nullable()->constrained('newsletter_lists')->nullOnDelete();
|
||||
$table->unsignedBigInteger('user_id')->nullable()->index();
|
||||
$table->string('format', 10);
|
||||
$table->unsignedInteger('row_count');
|
||||
$table->string('filename', 190);
|
||||
$table->json('filters');
|
||||
$table->json('stats')->nullable();
|
||||
$table->timestamp('created_at')->nullable()->index();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('newsletter_list_exports');
|
||||
Schema::dropIfExists('newsletter_lists');
|
||||
}
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue