forked from fa/breadcrumb-the-shire
37 lines
1000 B
PHP
37 lines
1000 B
PHP
<?php
|
|
|
|
namespace MintyPHP\Repository\Org;
|
|
|
|
interface DepartmentRepositoryInterface
|
|
{
|
|
public function list(): array;
|
|
|
|
public function listIds(): array;
|
|
|
|
public function listActiveIdsByTenantIds(array $tenantIds): array;
|
|
|
|
public function listByTenantIds(array $tenantIds): array;
|
|
|
|
public function listByIds(array $departmentIds, bool $includeInactive = false): 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;
|
|
|
|
public function existsByTenantAndDescription(int $tenantId, string $description, int $excludeId = 0): bool;
|
|
|
|
public function countByTenantId(int $tenantId): int;
|
|
|
|
public function create(array $data): mixed;
|
|
|
|
public function update(int $id, array $data): bool;
|
|
|
|
public function setTenant(int $id, int $tenantId): bool;
|
|
|
|
public function delete(int $id): bool;
|
|
}
|