44 lines
892 B
PHP
44 lines
892 B
PHP
<?php
|
|
|
|
namespace App\Enums\Order;
|
|
|
|
use Kwaadpepper\Enum\BaseEnumRoutable;
|
|
|
|
/**
|
|
* @method static self pending()
|
|
* La commande n'est pas encore évaluée
|
|
* @method static self cancelled()
|
|
* La commande est annulée
|
|
* @method static self validated()
|
|
* La commande est validée (pour préparation)
|
|
*/
|
|
final class ValidationStatus extends BaseEnumRoutable
|
|
{
|
|
/**
|
|
* Enum values
|
|
*
|
|
* @return array
|
|
*/
|
|
protected static function values(): array
|
|
{
|
|
return [
|
|
'pending' => 0,
|
|
'cancelled' => 1,
|
|
'validated' => 2,
|
|
];
|
|
}
|
|
|
|
/**
|
|
* Enum labels
|
|
*
|
|
* @return array
|
|
*/
|
|
protected static function labels(): array
|
|
{
|
|
return [
|
|
'pending' => __('En attente de validation'),
|
|
'cancelled' => __('Annulée'),
|
|
'validated' => __('Validée'),
|
|
];
|
|
}
|
|
}
|