buckets/app/Enums/DistributionModeEnum.php

31 lines
696 B
PHP
Raw Normal View History

2026-03-21 18:09:56 +01:00
<?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');
}
}