Ein Eingang fuer alle Kanaele (Paket 4, Prozessarchitektur v0.10)
Portalbuchungen und -anfragen aus Kalender und Mail werden ueber PortalIntake zum Vorgang (nur bei sicherer Erkennung), Dubletten ueber Buchungsnummer, gleiches Portal mit gleichen Naechten und Spiegelung; Unsicheres wird geklaert. Portalstorno und -aenderung als Aufgabe am Vorgang ohne stille Stornierung. Schalter je Kanal (Aus als Standard, Beobachten, Anlegen, Anlegen + weiter), Eingangsprotokoll, Bestandsuebernahme mit Vorschau/Bericht/Ruecknahme, Sperrnachweis in drei Stufen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
cf11c8a474
commit
ac9d20b812
29 files changed
+1952
-16
No files matched your search
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace App\Channels\Intake;
|
||||
|
||||
use App\Enums\CaseType;
|
||||
use App\Enums\IntakeOutcome;
|
||||
use App\Models\Booking;
|
||||
|
||||
/**
|
||||
* What the intake recognised in one incoming portal event, with its reasons in plain words.
|
||||
*/
|
||||
final class IntakeDecision
|
||||
{
|
||||
/**
|
||||
* @param list<string> $reasons why the intake decided so
|
||||
* @param list<string> $missing what the new case will not know yet
|
||||
*/
|
||||
public function __construct(
|
||||
public readonly IntakeOutcome $outcome,
|
||||
public readonly array $reasons = [],
|
||||
public readonly ?Booking $booking = null,
|
||||
public readonly ?CaseType $caseType = null,
|
||||
public readonly array $missing = [],
|
||||
public readonly ?string $reference = null,
|
||||
) {}
|
||||
|
||||
public function withBooking(Booking $booking): self
|
||||
{
|
||||
return new self($this->outcome, $this->reasons, $booking, $this->caseType ?? $booking->case_type, $this->missing, $this->reference);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param list<string> $reasons
|
||||
*/
|
||||
public function as(IntakeOutcome $outcome, array $reasons): self
|
||||
{
|
||||
return new self($outcome, $reasons, $this->booking, $this->caseType, $this->missing, $this->reference);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user