34 lines
654 B
PHP
34 lines
654 B
PHP
<?php
|
|
|
|
namespace App\Enums;
|
|
|
|
use App\Traits\WithCommentEnum;
|
|
use App\Traits\WithValueEnum;
|
|
|
|
enum EmploymentStatus: int
|
|
{
|
|
use WithCommentEnum, WithValueEnum;
|
|
|
|
case PERMANENT = 1;
|
|
case CONTRACT = 2;
|
|
case INTERN = 3;
|
|
|
|
public function label(): string
|
|
{
|
|
return match ($this) {
|
|
self::PERMANENT => 'Permanen',
|
|
self::CONTRACT => 'Kontrak',
|
|
self::INTERN => 'Magang',
|
|
};
|
|
}
|
|
|
|
public function color(): string
|
|
{
|
|
return match ($this) {
|
|
self::PERMANENT => 'emerald',
|
|
self::CONTRACT => 'yellow',
|
|
self::INTERN => 'lime',
|
|
};
|
|
}
|
|
}
|