2026-03-14 21:45:58 +01:00
|
|
|
<?php
|
|
|
|
|
|
2026-03-18 22:20:20 +01:00
|
|
|
namespace MintyPHP\Module\Bookmarks\Repository;
|
2026-03-14 21:45:58 +01:00
|
|
|
|
|
|
|
|
interface BookmarkGroupRepositoryInterface
|
|
|
|
|
{
|
2026-03-17 22:58:07 +01:00
|
|
|
/**
|
|
|
|
|
* @param array{limit?: int, offset?: int} $options
|
|
|
|
|
* @return list<array<string, mixed>>
|
|
|
|
|
*/
|
|
|
|
|
public function listByUser(int $userId, array $options = []): array;
|
2026-03-14 21:45:58 +01:00
|
|
|
|
|
|
|
|
public function countByUser(int $userId): int;
|
|
|
|
|
|
|
|
|
|
/** @return array<string, mixed>|false */
|
|
|
|
|
public function findById(int $id, int $userId): array|false;
|
|
|
|
|
|
|
|
|
|
public function create(array $data): int|false;
|
|
|
|
|
|
|
|
|
|
public function update(int $id, int $userId, array $data): bool;
|
|
|
|
|
|
|
|
|
|
public function delete(int $id, int $userId): bool;
|
|
|
|
|
|
|
|
|
|
/** @param list<array{id: int, sort_order: int}> $idOrderPairs */
|
|
|
|
|
public function updateSortOrders(int $userId, array $idOrderPairs): bool;
|
|
|
|
|
}
|