Files
LarsandClaude Sonnet 5.5 221ce8ca81 Anfrage-Basisprozess inquiry.request mit Schablonen für Antwort und Gastkommunikation
Antwortart (Auskunft/Angebot) und Reservierung sind entkoppelt (neue Einstellung inquiry_answer;
pre_reservation bleibt die Reservierungsstrategie). Anlass-bezogene Absender für Anreise-Information
und Bewertungsbitte; Schablonen liefern Standardwerte unterhalb aller einstellbaren Ebenen.
A1/A2 bleiben Voreinstellungen und Altfassungen.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-05 12:40:22 +01:00

75 lines
2.8 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
namespace App\Process\Templates;
use App\Enums\ProcessSetting;
/**
* A functional area of a process where a model offers a slot for a function template. Each area answers one business
* decision and stands for exactly one result of the process (so the same result is never produced twice).
*/
enum TemplateArea: string
{
case Collection = 'collection';
case ContractDocuments = 'contract_documents';
case InquiryAnswer = 'inquiry_answer';
case GuestCommunication = 'guest_communication';
public function label(): string
{
return match ($this) {
self::Collection => 'Finanzabwicklung (Inkasso)',
self::ContractDocuments => 'Vertragsdokumentation',
self::InquiryAnswer => 'Beantwortung der Anfrage',
self::GuestCommunication => 'Gastkommunikation',
};
}
public function question(): string
{
return match ($this) {
self::Collection => 'Wer zieht das Geld des Gastes ein?',
self::ContractDocuments => 'Wer stellt dem Gast die Vertragsunterlagen bereit?',
self::InquiryAnswer => 'Womit antworten wir zuerst auf eine Anfrage?',
self::GuestCommunication => 'Wer schreibt dem Gast zu welchem Anlass? (Standard – jeder Anlass bleibt einzeln einstellbar)',
};
}
/** The process result every template of this area provides – exactly once per process. */
public function result(): string
{
return match ($this) {
self::Collection => 'money.collection_handled',
self::ContractDocuments => 'contract.documented',
self::InquiryAnswer => 'inquiry.answered',
self::GuestCommunication => 'guest.communication_assigned',
};
}
/** The responsibility setting the chosen template fixes. */
public function setting(): ProcessSetting
{
return match ($this) {
self::Collection => ProcessSetting::Payments,
self::ContractDocuments => ProcessSetting::Documents,
self::InquiryAnswer => ProcessSetting::InquiryAnswer,
self::GuestCommunication => ProcessSetting::GuestMessages,
};
}
/**
* Every setting a template of this area may fix or suggest – nothing else (no hidden coupling to other areas).
*
* @return list<ProcessSetting>
*/
public function settings(): array
{
return match ($this) {
self::Collection, self::ContractDocuments => [$this->setting()],
// An information reserves nothing by definition; for an offer the reservation is only suggested.
self::InquiryAnswer => [ProcessSetting::InquiryAnswer, ProcessSetting::PreReservation],
self::GuestCommunication => [ProcessSetting::GuestMessages, ProcessSetting::ArrivalInfoSender, ProcessSetting::ReviewRequestSender],
};
}
}