pelican-panel-mirror/app/Contracts/Repository/AllocationRepositoryInterface.php
2024-03-12 22:39:16 -04:00

20 lines
518 B
PHP

<?php
namespace App\Contracts\Repository;
use App\Models\Allocation;
interface AllocationRepositoryInterface extends RepositoryInterface
{
/**
* Return all the allocations that exist for a node that are not currently
* allocated.
*/
public function getUnassignedAllocationIds(int $node): array;
/**
* Return a single allocation from those meeting the requirements.
*/
public function getRandomAllocation(array $nodes, array $ports, bool $dedicated = false): ?Allocation;
}