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>
108 lines
3.7 KiB
PHP
108 lines
3.7 KiB
PHP
<?php
|
||
|
||
namespace App\Process\Models;
|
||
|
||
use App\Enums\CaseType;
|
||
use App\Enums\IntakeKind;
|
||
use App\Enums\Responsibility;
|
||
use App\Process\Templates\TemplateArea;
|
||
|
||
/**
|
||
* The base process of a booking that is already binding at a portal (E-036), with slots for the function templates
|
||
* of collection and contract documentation. It replaces the fixed combinations A3/A4/A5: who collects and who provides
|
||
* the contract documents are chosen independently (docs/Prozessarchitektur/SCHABLONEN.md); the case type stays a derived
|
||
* classification. The course is the one A3–A5 share, with the slots at the positions of the modules they replace.
|
||
*/
|
||
class ExternalBookingModel extends ProcessModel
|
||
{
|
||
/** Results the base process provides to the templates. */
|
||
public const PROVIDES = ['case.recorded', 'guest.identified', 'binding.portal_total', 'price.known'];
|
||
|
||
public static function key(): string
|
||
{
|
||
return 'external.booking';
|
||
}
|
||
|
||
public static function version(): int
|
||
{
|
||
return 1;
|
||
}
|
||
|
||
public static function label(): string
|
||
{
|
||
return 'Extern verbindliche Portalbuchung';
|
||
}
|
||
|
||
public static function description(): string
|
||
{
|
||
return 'Das Portal bestätigt verbindlich. Wer das Geld einzieht und wer die Vertragsunterlagen bereitstellt, wählen Sie unabhängig voneinander; die Einzelschritte bleiben einstellbar.';
|
||
}
|
||
|
||
public static function caseTypes(): array
|
||
{
|
||
return [CaseType::A3, CaseType::A4, CaseType::A5];
|
||
}
|
||
|
||
public static function intakes(): array
|
||
{
|
||
return [IntakeKind::Booking];
|
||
}
|
||
|
||
/**
|
||
* Collection and contract documentation are chosen by template; guest communication is limited by the portal's
|
||
* confirmed capability, not by a fixed model.
|
||
*/
|
||
public static function responsibilities(): Responsibilities
|
||
{
|
||
return Responsibilities::of(
|
||
fixed: ['contract' => Responsibility::Portal],
|
||
variable: [
|
||
'collection' => [Responsibility::Landlord, Responsibility::Portal],
|
||
'contract_documents' => [Responsibility::Landlord, Responsibility::Portal],
|
||
'guest_messages' => [Responsibility::Landlord, Responsibility::Portal],
|
||
'supplementary_documents' => [Responsibility::Landlord, Responsibility::Nobody],
|
||
'local_services' => [Responsibility::Landlord],
|
||
],
|
||
);
|
||
}
|
||
|
||
public static function providedResults(): array
|
||
{
|
||
return self::PROVIDES;
|
||
}
|
||
|
||
public static function defaultTemplates(): array
|
||
{
|
||
return [
|
||
TemplateArea::Collection->value => 'collection.own',
|
||
TemplateArea::ContractDocuments->value => 'contract_docs.own',
|
||
TemplateArea::GuestCommunication->value => 'guest_comm.own',
|
||
];
|
||
}
|
||
|
||
public function steps(): array
|
||
{
|
||
return [
|
||
Step::module('intake.record'),
|
||
Step::module('guest.details'),
|
||
Step::point(Point::AfterGuestIdentified),
|
||
Step::module('binding.portal'),
|
||
Step::module('portal.confirmation'),
|
||
Step::point(Point::AfterBinding),
|
||
Step::slot(TemplateArea::ContractDocuments),
|
||
Step::module('channels.block'),
|
||
Step::slot(TemplateArea::Collection),
|
||
Step::module('case.tasks'),
|
||
Step::module('change.proposal'),
|
||
Step::slot(TemplateArea::GuestCommunication),
|
||
Step::module('guest.data_request'),
|
||
Step::point(Point::BeforeStay),
|
||
Step::module('stay'),
|
||
Step::module('review.request'),
|
||
Step::point(Point::BeforeSettlement),
|
||
Step::module('case.closure'),
|
||
Step::module('case.settlement'),
|
||
];
|
||
}
|
||
}
|