pipicar/modules/applications/Enum/ApplicationStatus.php

26 lines
592 B
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<?php
namespace App\Modules\applications\Enum;
enum ApplicationStatus: string
{
case pending = 'pending';
case approved = 'approved';
case rejected = 'rejected';
case completed = 'completed';
case review = 'review';
function getName(): string
{
return match ($this) {
self::pending => 'В обработке',
self::approved => 'Бронь',
self::rejected => 'Отклонена',
self::completed => 'Завершена',
self::review => 'На рассмотрении',
};
}
}