trypost/app/Enums/InviteStatus.php
2026-01-14 22:13:44 -03:00

31 lines
686 B
PHP

<?php
namespace App\Enums;
enum InviteStatus: string
{
case Pending = 'pending';
case Accepted = 'accepted';
case Expired = 'expired';
case Cancelled = 'cancelled';
public function label(): string
{
return match ($this) {
self::Pending => 'Pendente',
self::Accepted => 'Aceito',
self::Expired => 'Expirado',
self::Cancelled => 'Cancelado',
};
}
public function color(): string
{
return match ($this) {
self::Pending => 'yellow',
self::Accepted => 'green',
self::Expired => 'gray',
self::Cancelled => 'red',
};
}
}