Move location service to match other services

This commit is contained in:
Dane Everitt 2017-09-15 00:16:03 -05:00
parent a8560b720a
commit a498bbc7d5
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
14 changed files with 414 additions and 149 deletions

View file

@ -28,17 +28,6 @@ use Pterodactyl\Contracts\Repository\Attributes\SearchableInterface;
interface LocationRepositoryInterface extends RepositoryInterface, SearchableInterface
{
/**
* Delete a location only if there are no nodes attached to it.
*
* @param $id
* @return bool|mixed|null
*
* @throws \Pterodactyl\Exceptions\DisplayException
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
*/
public function deleteIfNoNodes($id);
/**
* Return locations with a count of nodes and servers attached to it.
*
@ -62,4 +51,14 @@ interface LocationRepositoryInterface extends RepositoryInterface, SearchableInt
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
*/
public function getWithNodes($id);
/**
* Return a location and the count of nodes in that location.
*
* @param int $id
* @return mixed
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
*/
public function getWithNodeCount($id);
}