You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
639 B
29 lines
639 B
<?php
|
|
|
|
namespace App\Domains\Identity\Enums;
|
|
|
|
use App\Domains\System\Traits\Enum\HasPredicateMethod;
|
|
use App\UI\Enums\Concerns\InteractsWithLabels;
|
|
use App\UI\Enums\Contracts\HasLabel;
|
|
use App\UI\Enums\Contracts\HasUiBadge;
|
|
|
|
/**
|
|
* @method bool isActive()
|
|
* @method bool isInactive()
|
|
*/
|
|
enum UserStatus: string implements HasLabel, HasUiBadge
|
|
{
|
|
use HasPredicateMethod;
|
|
use InteractsWithLabels;
|
|
|
|
case ACTIVE = 'active';
|
|
case INACTIVE = 'inactive';
|
|
|
|
public function variant(): string
|
|
{
|
|
return match ($this) {
|
|
self::ACTIVE => 'success',
|
|
self::INACTIVE => 'danger',
|
|
};
|
|
}
|
|
}
|
|
|