V2.1: Kommunikation nach Medium, Absicht und Wirkung (Fälle E/F)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8442d0a3d8
commit
8026eceab4
13 files changed
+633
-2
No files matched your search
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use Filament\Support\Contracts\HasLabel;
|
||||
|
||||
/**
|
||||
* The communication medium a message came through (V2.1). It says nothing about bindingness or business meaning.
|
||||
* WhatsApp and Chat exist as test cases of the architecture; no provider is connected.
|
||||
*/
|
||||
enum Medium: string implements HasLabel
|
||||
{
|
||||
case Email = 'email';
|
||||
case Form = 'form';
|
||||
case WhatsApp = 'whatsapp';
|
||||
case Chat = 'chat';
|
||||
|
||||
public function getLabel(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::Email => 'E-Mail',
|
||||
self::Form => 'Formular',
|
||||
self::WhatsApp => 'WhatsApp',
|
||||
self::Chat => 'Chat',
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use Filament\Support\Contracts\HasLabel;
|
||||
|
||||
/**
|
||||
* What a message may cause (V2.1). No effect creates a case, a reservation, an offer or a booking.
|
||||
*/
|
||||
enum MessageEffect: string implements HasLabel
|
||||
{
|
||||
case AnswerInformation = 'answer_information';
|
||||
case ContributeFacts = 'contribute_facts';
|
||||
case ReportToCase = 'report_to_case';
|
||||
case HandoffInquiry = 'handoff_inquiry';
|
||||
case Review = 'review';
|
||||
|
||||
public function getLabel(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::AnswerInformation => 'allgemeine Auskunft geben',
|
||||
self::ContributeFacts => 'Angaben für den Vorgang vorschlagen',
|
||||
self::ReportToCase => 'Aufgabe am Vorgang anlegen',
|
||||
self::HandoffInquiry => 'auf den Anfrageweg verweisen',
|
||||
self::Review => 'zur Klärung vorlegen',
|
||||
};
|
||||
}
|
||||
|
||||
/** Effects that act on an existing case and therefore need a verified assignment. */
|
||||
public function needsCase(): bool
|
||||
{
|
||||
return $this === self::ContributeFacts || $this === self::ReportToCase;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use App\Communication\IntentClassifier;
|
||||
use Filament\Support\Contracts\HasLabel;
|
||||
|
||||
/**
|
||||
* What a message wants (V2.1) – decided by the rules of {@see IntentClassifier}, independent of the medium.
|
||||
*/
|
||||
enum MessageIntent: string implements HasLabel
|
||||
{
|
||||
case GeneralQuestion = 'general_question';
|
||||
case StayInquiry = 'stay_inquiry';
|
||||
case CaseReply = 'case_reply';
|
||||
case ProvideData = 'provide_data';
|
||||
case ChangeRequest = 'change_request';
|
||||
case Unclear = 'unclear';
|
||||
|
||||
public function getLabel(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::GeneralQuestion => 'allgemeine Frage',
|
||||
self::StayInquiry => 'Anfrage zu einem Aufenthalt',
|
||||
self::CaseReply => 'Antwort in einem Vorgang',
|
||||
self::ProvideData => 'Angaben zu einem Vorgang',
|
||||
self::ChangeRequest => 'Änderungswunsch',
|
||||
self::Unclear => 'unklar',
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user