2026-03-05 08:26:51 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace MintyPHP\Repository\Tenant;
|
|
|
|
|
|
2026-03-13 21:58:51 +01:00
|
|
|
/** Contract for querying user-tenant membership and per-tenant user counts. */
|
2026-03-05 08:26:51 +01:00
|
|
|
interface UserTenantRepositoryInterface
|
|
|
|
|
{
|
|
|
|
|
public function listTenantIdsByUserId(int $userId): array;
|
|
|
|
|
|
|
|
|
|
public function replaceForUser(int $userId, array $tenantIds): bool;
|
|
|
|
|
|
|
|
|
|
public function countUsersByTenantIds(array $tenantIds): array;
|
|
|
|
|
|
|
|
|
|
public function countActiveUsersByTenantIds(array $tenantIds): array;
|
2026-03-20 00:05:03 +01:00
|
|
|
|
|
|
|
|
/** @return list<int> */
|
|
|
|
|
public function listActiveUserIdsByTenantId(int $tenantId): array;
|
2026-03-05 08:26:51 +01:00
|
|
|
}
|