Files
fewo-stommer/app/Process/Models/ExternalBookingModel.php
T
LarsandClaude Sonnet 5.5 e95ba4f986 Schablonenkomposition: Basisprozess external.booking mit Platz für Finanz- und Dokumentenschablonen
Vier Schablonen (Eigenes/Portal-Inkasso, Eigene/Externe Vertragsdokumentation) in
app/Process/Templates, TemplateComposer prüft Ergebnisse, Verantwortlichkeiten, Ausschlüsse
und harte Modulabhängigkeiten. Der Plan friert die Schablonenversionen ein. A3–A5 bleiben
als Voreinstellungen; die vierte Kombination (eigenes Inkasso + externe Unterlagen) ist
darstellbar. Konfigurator-Logik und ConfigureChannelProcess kennen die Schablonenwahl.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-05 10:48:49 +01:00

108 lines
3.6 KiB
PHP
Raw 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\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'];
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',
];
}
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::module('arrival.details'),
Step::module('arrival.info'),
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'),
];
}
}