v0.11 U4: Rückfrage, Folgefrage, Erinnerung und Ergänzungslink

- data_requests: ein Beschaffungsvorgang je Vorgang mit Modus
  (automatisch / Freigabe / manuell), getrennten Zählern für Folgefragen
  und Erinnerungen ohne Rücksetzen, Antwortfrist ≠ Reservierungsfrist.
- RequestCaseData: fragt nach, was für das nächste Angebot, die
  Wunschbestätigung oder (bei verbindlichen Buchungen) administrativ fehlt;
  ohne E-Mail keine Rückfrage. Teilantwort → gezielte Folgefrage, Schweigen
  → Erinnerungen, an der Grenze Aufgabe für die Vermieterin. Nie ein Hold.
- Mail DataRequested mit Texten nach tatsächlichem Sperrstatus (M11);
  Dokumentart „Rückfrage“ – im Live-Betrieb ohne Freigabe nur nach Klick.
- Signierter, versionierter Ergänzungslink (/angebot/angaben): Lesen
  schreibt nicht, Absenden über den Fakteneingang, idempotent.
- Vorgang: „Rückfrage an den Gast senden“ / „Rückfrage beenden“;
  Eingangsbestätigung nennt die Klärungsreservierung korrekt.
- Zeitplan: cases:data-requests alle fünf Minuten.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
LarsandClaude Opus 5.5 committed 2026-11-03 13:25:48 +01:00
1 parent 37f48defcc
commit e4a3cb7f7b
22 files changed
+1224 -7

No files matched your search

@@ -0,0 +1,53 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
/**
* Prozessarchitektur v0.11, data request (S1/S4, CH-15–CH-18): one coherent request for missing details of a case –
* first question, targeted follow-up questions and reminders with their own counters that are never reset, the answer
* deadline (which is not a reservation deadline) and the version of the guest's link.
*/
return new class extends Migration
{
public function up(): void
{
Schema::create('data_requests', function (Blueprint $table) {
$table->id();
$table->foreignId('tenant_id')->nullable()->constrained()->cascadeOnDelete();
$table->foreignId('booking_id')->constrained()->cascadeOnDelete();
$table->string('status', 20);
$table->string('mode', 20);
$table->string('purpose', 30);
$table->json('fields');
$table->unsignedTinyInteger('followups_sent')->default(0);
$table->unsignedTinyInteger('reminders_sent')->default(0);
$table->unsignedSmallInteger('link_version')->default(1);
$table->string('last_message', 20)->nullable();
$table->dateTime('last_sent_at')->nullable();
$table->dateTime('response_due_at')->nullable();
$table->dateTime('next_reminder_at')->nullable();
$table->dateTime('answered_at')->nullable();
$table->dateTime('closed_at')->nullable();
$table->string('closed_reason')->nullable();
$table->timestamps();
$table->index(['booking_id', 'status']);
$table->index(['status', 'next_reminder_at']);
});
Schema::table('booking_messages', function (Blueprint $table) {
$table->string('message_id')->nullable()->after('subject')->index();
});
}
public function down(): void
{
Schema::table('booking_messages', function (Blueprint $table) {
$table->dropColumn('message_id');
});
Schema::dropIfExists('data_requests');
}
};