2026-03-05 08:26:51 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace MintyPHP\Repository\Org;
|
|
|
|
|
|
2026-03-13 21:58:51 +01:00
|
|
|
/** Contract for querying user-department membership and per-department user counts. */
|
2026-03-05 08:26:51 +01:00
|
|
|
interface UserDepartmentRepositoryInterface
|
|
|
|
|
{
|
|
|
|
|
public function listDepartmentIdsByUserId(int $userId): array;
|
|
|
|
|
|
|
|
|
|
public function replaceForUser(int $userId, array $departmentIds): bool;
|
|
|
|
|
|
|
|
|
|
public function removeInvalidForDepartment(int $departmentId): int;
|
|
|
|
|
|
|
|
|
|
public function countUsersByDepartmentIds(array $departmentIds): array;
|
|
|
|
|
|
|
|
|
|
public function countActiveUsersByDepartmentIds(array $departmentIds): array;
|
|
|
|
|
}
|