Task module
This commit is contained in:
20
backend/src/Enum/TaskStatus.php
Normal file
20
backend/src/Enum/TaskStatus.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enum;
|
||||
|
||||
enum TaskStatus: string
|
||||
{
|
||||
case Active = 'active';
|
||||
case Done = 'done';
|
||||
case Inactive = 'inactive';
|
||||
case Past = 'past';
|
||||
|
||||
/** @return list<string> */
|
||||
public static function userSelectableValues(): array
|
||||
{
|
||||
return array_values(array_map(
|
||||
fn (self $s) => $s->value,
|
||||
array_filter(self::cases(), fn (self $s) => $s !== self::Past)
|
||||
));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user