b2in/app/Enums/CurationStatus.php
2026-02-20 17:57:50 +01:00

28 lines
583 B
PHP

<?php
namespace App\Enums;
enum CurationStatus: string
{
case Pending = 'pending';
case Approved = 'approved';
case Rejected = 'rejected';
public function label(): string
{
return match ($this) {
self::Pending => 'Ausstehend',
self::Approved => 'Freigegeben',
self::Rejected => 'Abgelehnt',
};
}
public function color(): string
{
return match ($this) {
self::Pending => 'yellow',
self::Approved => 'green',
self::Rejected => 'red',
};
}
}