31 lines
696 B
PHP
31 lines
696 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Enums;
|
||
|
|
|
||
|
|
enum DistributionModeEnum: string
|
||
|
|
{
|
||
|
|
case EVEN = 'even';
|
||
|
|
case PRIORITY = 'priority';
|
||
|
|
|
||
|
|
public function getLabel(): string
|
||
|
|
{
|
||
|
|
return match ($this) {
|
||
|
|
self::EVEN => 'Even Split',
|
||
|
|
self::PRIORITY => 'Priority Order',
|
||
|
|
};
|
||
|
|
}
|
||
|
|
|
||
|
|
public function getDescription(): string
|
||
|
|
{
|
||
|
|
return match ($this) {
|
||
|
|
self::EVEN => 'Split evenly across buckets in each phase, respecting individual capacity',
|
||
|
|
self::PRIORITY => 'Fill highest-priority bucket first, then next',
|
||
|
|
};
|
||
|
|
}
|
||
|
|
|
||
|
|
public static function values(): array
|
||
|
|
{
|
||
|
|
return array_column(self::cases(), 'value');
|
||
|
|
}
|
||
|
|
}
|