2026-03-05 08:26:51 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace MintyPHP\Repository\Access;
|
|
|
|
|
|
2026-03-13 21:58:51 +01:00
|
|
|
/** Contract for role CRUD, existence checks, and filtered listing. */
|
2026-03-05 08:26:51 +01:00
|
|
|
interface RoleRepositoryInterface
|
|
|
|
|
{
|
|
|
|
|
public function list(): array;
|
|
|
|
|
|
|
|
|
|
public function listActive(): array;
|
|
|
|
|
|
|
|
|
|
public function listByIds(array $roleIds): array;
|
|
|
|
|
|
|
|
|
|
public function listIds(): array;
|
|
|
|
|
|
|
|
|
|
public function listActiveIds(): array;
|
|
|
|
|
|
|
|
|
|
public function listPaged(array $options): array;
|
|
|
|
|
|
|
|
|
|
public function find(int $id): ?array;
|
|
|
|
|
|
|
|
|
|
public function findByUuid(string $uuid): ?array;
|
|
|
|
|
|
|
|
|
|
public function existsByCode(string $code, int $excludeId = 0): bool;
|
|
|
|
|
|
2026-03-22 18:25:33 +01:00
|
|
|
public function create(array $data): int|false;
|
2026-03-05 08:26:51 +01:00
|
|
|
|
|
|
|
|
public function update(int $id, array $data): bool;
|
|
|
|
|
|
|
|
|
|
public function delete(int $id): bool;
|
|
|
|
|
}
|