Files
Kol-Manager/app/Enums/InvoiceStatus.php
2026-04-01 08:04:56 +07:00

37 lines
862 B
PHP

<?php
declare(strict_types=1);
namespace App\Enums;
enum InvoiceStatus: string
{
case Draft = 'draft';
case Sent = 'sent';
case Paid = 'paid';
case Overdue = 'overdue';
case Cancelled = 'cancelled';
public function label(): string
{
return match($this) {
self::Draft => 'Draft',
self::Sent => 'Sent',
self::Paid => 'Paid',
self::Overdue => 'Overdue',
self::Cancelled => 'Cancelled',
};
}
public function badgeClass(): string
{
return match($this) {
self::Draft => 'badge-ghost',
self::Sent => 'badge-info',
self::Paid => 'badge-success',
self::Overdue => 'badge-error',
self::Cancelled => 'badge-neutral',
};
}
}