33 lines
777 B
PHP
33 lines
777 B
PHP
<?php
|
|
|
|
namespace App\Model;
|
|
|
|
final class CommandTaskStatus
|
|
{
|
|
public const string PENDING = 'pending';
|
|
public const string IN_PROGRESS = 'in-progress';
|
|
public const string COMPLETED = 'completed';
|
|
public const string FAILED = 'failed';
|
|
|
|
private const array STATUS = [
|
|
self::PENDING => 'Pendiente',
|
|
self::IN_PROGRESS => 'En progreso',
|
|
self::COMPLETED => 'Completado',
|
|
self::FAILED => 'Fallido',
|
|
];
|
|
|
|
public static function getStatus(): array
|
|
{
|
|
return self::STATUS;
|
|
}
|
|
|
|
public static function getCommandTaskStatus(string $status): ?string
|
|
{
|
|
return self::STATUS[$status] ?? null;
|
|
}
|
|
|
|
public static function getStatusKeys(): array
|
|
{
|
|
return array_keys(self::STATUS);
|
|
}
|
|
} |