33 lines
989 B
PHP
33 lines
989 B
PHP
<?php
|
|
|
|
namespace App\Enum\Groups;
|
|
|
|
/**
|
|
* The single lifecycle of a booking record. Every case names exactly one state and
|
|
* exactly one party it is waiting on: Angefragt and Entwurf wait on the office to
|
|
* prepare an offer, Offen waits on the customer to accept it, Eingegangen waits on
|
|
* the office to confirm. Where the record came from is not encoded here — that is
|
|
* what AccommodationBookingOrigin is for.
|
|
*/
|
|
enum AccommodationBookingStatus: string
|
|
{
|
|
case Draft = 'draft';
|
|
case Requested = 'requested';
|
|
case Open = 'open';
|
|
case Received = 'received';
|
|
case Confirmed = 'confirmed';
|
|
case Discarded = 'discarded';
|
|
|
|
public function label(): string
|
|
{
|
|
return match ($this) {
|
|
self::Draft => 'Entwurf',
|
|
self::Requested => 'Angefragt',
|
|
self::Open => 'Offen',
|
|
self::Received => 'Eingegangen',
|
|
self::Confirmed => 'Bestätigt',
|
|
self::Discarded => 'Absage',
|
|
};
|
|
}
|
|
}
|