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>
136 lines
5.0 KiB
PHP
136 lines
5.0 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 request (own website, portal inquiry, phone, e-mail) – the one course A1 and A2 shared, with
|
||
* slots for how it is answered (information or binding offer), the contract documentation, the collection and the
|
||
* guest communication. A1/A2 stay as presets, classification and for historical cases. The reservation is not part
|
||
* of the answer template: the hold module and the reservation setting stay independent of it (docs/Prozessarchitektur/
|
||
* SCHABLONENKATALOG.md §4.3).
|
||
*/
|
||
class InquiryRequestModel extends ProcessModel
|
||
{
|
||
/** Results the base process provides to the templates. */
|
||
public const PROVIDES = ['case.recorded', 'guest.identified', 'availability.checked', 'price.known'];
|
||
|
||
public static function key(): string
|
||
{
|
||
return 'inquiry.request';
|
||
}
|
||
|
||
public static function version(): int
|
||
{
|
||
return 1;
|
||
}
|
||
|
||
public static function label(): string
|
||
{
|
||
return 'Anfrage';
|
||
}
|
||
|
||
public static function description(): string
|
||
{
|
||
return 'Eine Anfrage – von der eigenen Webseite oder einem Portal. Sie wählen, womit Sie antworten (Auskunft oder verbindliches Angebot) und wer wem schreibt; Datenbeschaffung und Reservierung laufen unabhängig davon.';
|
||
}
|
||
|
||
public static function caseTypes(): array
|
||
{
|
||
return [CaseType::A1, CaseType::A2];
|
||
}
|
||
|
||
public static function intakes(): array
|
||
{
|
||
return [IntakeKind::Inquiry];
|
||
}
|
||
|
||
public static function responsibilities(): Responsibilities
|
||
{
|
||
return Responsibilities::of(
|
||
fixed: ['contract' => Responsibility::Landlord, 'collection' => Responsibility::Landlord, 'contract_documents' => Responsibility::Landlord],
|
||
variable: [
|
||
'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 templateRestrictions(): array
|
||
{
|
||
return [
|
||
'collection.portal' => 'Bei einer Anfrage schließen wir den Vertrag selbst (Annahme des Angebots) und kassieren selbst; Inkasso beim Portal gibt es nur bei bereits verbindlich gebuchten Portalbuchungen.',
|
||
'contract_docs.external' => 'Bei einer Anfrage entsteht der Vertrag erst durch unser Angebot und die Annahme des Gastes; das Portal kann keine Vertragsunterlagen dafür bereitstellen.',
|
||
];
|
||
}
|
||
|
||
public static function defaultTemplates(): array
|
||
{
|
||
return [
|
||
TemplateArea::InquiryAnswer->value => 'inquiry.binding_offer',
|
||
TemplateArea::ContractDocuments->value => 'contract_docs.own',
|
||
TemplateArea::Collection->value => 'collection.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('hold'),
|
||
Step::module('availability.check'),
|
||
Step::slot(TemplateArea::InquiryAnswer),
|
||
Step::point(Point::BeforePriceFixing),
|
||
Step::module('offer.binding'),
|
||
Step::point(Point::BeforeBindingOffer),
|
||
Step::module('offer.acceptance'),
|
||
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'),
|
||
];
|
||
}
|
||
|
||
/**
|
||
* The extension variants of the architecture proof (tester only), as on the former offer model.
|
||
*
|
||
* @return list<Variant>
|
||
*/
|
||
public function variants(): array
|
||
{
|
||
return [
|
||
Variant::make('standard', 'Standard'),
|
||
Variant::make('loyalty', 'Mit Stammgastrabatt (Architekturnachweis, nur im Prozess-Tester)')
|
||
->testerOnly()
|
||
->insert(Point::AfterGuestIdentified, 'guest.loyalty_status')
|
||
->insert(Point::BeforePriceFixing, 'pricing.loyalty_discount'),
|
||
Variant::make('address_check', 'Mit Anschriftsprüfung (Zusatzschritt, nur im Prozess-Tester)')
|
||
->testerOnly()
|
||
->insert(Point::AfterGuestIdentified, 'guest.address_check'),
|
||
];
|
||
}
|
||
}
|