. */ namespace SP\Domain\Notification\In; use SP\Core\Exceptions\ConstraintException; use SP\Core\Exceptions\QueryException; use SP\DataModel\ItemSearchData; use SP\DataModel\NotificationData; use SP\Domain\Common\In\RepositoryInterface; use SP\Infrastructure\Database\QueryResult; /** * Class NotificationRepository * * @package SP\Infrastructure\Notification\Repositories */ interface NotificationRepositoryInterface extends RepositoryInterface { /** * Deletes an item * * @param int $id * * @return int * @throws \SP\Core\Exceptions\ConstraintException * @throws \SP\Core\Exceptions\QueryException */ public function deleteAdmin(int $id): int; /** * Deletes an item * * @param array $ids * * @return int * @throws ConstraintException * @throws QueryException */ public function deleteAdminBatch(array $ids): int; /** * Searches for items by a given filter * * @param ItemSearchData $itemSearchData * @param int $userId * * @return QueryResult * @throws ConstraintException * @throws QueryException */ public function searchForUserId(ItemSearchData $itemSearchData, int $userId): QueryResult; /** * Searches for items by a given filter * * @param ItemSearchData $itemSearchData * @param int $userId * * @return QueryResult * @throws ConstraintException * @throws QueryException */ public function searchForAdmin(ItemSearchData $itemSearchData, int $userId): QueryResult; /** * Marcar una notificación como leída * * @param int $id * * @return int * @throws \SP\Core\Exceptions\ConstraintException * @throws \SP\Core\Exceptions\QueryException */ public function setCheckedById(int $id): int; /** * Devolver las notificaciones de un usuario para una fecha y componente determinados * * @param string $component * @param int $userId * * @return QueryResult * @throws \SP\Core\Exceptions\ConstraintException * @throws \SP\Core\Exceptions\QueryException */ public function getForUserIdByDate(string $component, int $userId): QueryResult; /** * @param int $id * * @return QueryResult * @throws \SP\Core\Exceptions\ConstraintException * @throws \SP\Core\Exceptions\QueryException */ public function getAllForUserId(int $id): QueryResult; /** * @param int $id * * @return QueryResult * @throws \SP\Core\Exceptions\ConstraintException * @throws \SP\Core\Exceptions\QueryException */ public function getAllActiveForUserId(int $id): QueryResult; /** * @param int $id * * @return QueryResult * @throws \SP\Core\Exceptions\ConstraintException * @throws \SP\Core\Exceptions\QueryException */ public function getAllActiveForAdmin(int $id): QueryResult; }