CaseActivities/CaseAutomation sind Fassaden über ProcessRunner. Verhaltensvergleich v0.11: 11 Abläufe und 198 Konstellationen gleich, beabsichtigte Abweichungen I-004/I-005 (F-001/F-002). Volle Suite vor U-B: 785/785. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
87 lines
2.9 KiB
PHP
87 lines
2.9 KiB
PHP
<?php
|
||
|
||
namespace App\Process\Models;
|
||
|
||
use App\Enums\IntakeKind;
|
||
use App\Enums\Responsibility;
|
||
|
||
/**
|
||
* Common course of a request answered on our own way (A1 direct/website, A2 via an intermediary): intake, guest's
|
||
* details, hold and availability, our answer (binding offer or information), acceptance, then the binding booking with
|
||
* our contract documentation, payments, stay and closing. The variants of A1/A2 share it; the models differ by intake
|
||
* channel and what they fix.
|
||
*/
|
||
abstract class InquiryModel extends ProcessModel
|
||
{
|
||
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' => static::guestMessageOptions(),
|
||
'supplementary_documents' => [Responsibility::Landlord, Responsibility::Nobody],
|
||
'local_services' => [Responsibility::Landlord],
|
||
],
|
||
);
|
||
}
|
||
|
||
/**
|
||
* Who may write to the guest: ourselves; via an intermediary also its messaging.
|
||
*
|
||
* @return list<Responsibility>
|
||
*/
|
||
protected static function guestMessageOptions(): array
|
||
{
|
||
return [Responsibility::Landlord];
|
||
}
|
||
|
||
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::module('offer.information'),
|
||
Step::point(Point::BeforePriceFixing),
|
||
Step::module('offer.binding'),
|
||
Step::point(Point::BeforeBindingOffer),
|
||
Step::module('offer.acceptance'),
|
||
Step::point(Point::AfterBinding),
|
||
...self::bindingCourse(),
|
||
];
|
||
}
|
||
|
||
/**
|
||
* What follows once a case is binding – shared with the portal bookings.
|
||
*
|
||
* @return list<Step>
|
||
*/
|
||
public static function bindingCourse(): array
|
||
{
|
||
return [
|
||
Step::module('documents.send'),
|
||
Step::module('channels.block'),
|
||
Step::module('payments.monitor'),
|
||
Step::module('portal.payout'),
|
||
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'),
|
||
];
|
||
}
|
||
}
|