pipicar/modules/applications/Enum/ApplicationStatus.php

24 lines
503 B
PHP
Raw 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';
function getName(): string
{
return match ($this) {
self::pending => 'В обработке',
self::approved => 'Бронь',
self::rejected => 'Отклонена',
self::completed => 'Завершена',
};
}
}