. */ namespace SP\Domain\Account\In; use SP\Core\Exceptions\ConstraintException; use SP\Core\Exceptions\QueryException; use SP\Domain\Account\Services\AccountRequest; use SP\Infrastructure\Database\QueryResult; /** * Class AccountToUserGroupRepository * * @package SP\Infrastructure\Account\Repositories */ interface AccountToUserGroupRepositoryInterface { /** * Obtiene el listado con el nombre de los grupos de una cuenta. * * @param int $id con el Id de la cuenta * * @return QueryResult * @throws ConstraintException * @throws QueryException */ public function getUserGroupsByAccountId(int $id): QueryResult; /** * Obtiene el listado con el nombre de los grupos de una cuenta. * * @param int $id * * @return QueryResult * @throws \SP\Core\Exceptions\ConstraintException * @throws \SP\Core\Exceptions\QueryException */ public function getUserGroupsByUserGroupId(int $id): QueryResult; /** * @param $id int * * @return int * @throws ConstraintException * @throws QueryException */ public function deleteByUserGroupId(int $id): int; /** * @param AccountRequest $accountRequest * @param bool $isEdit * * @return int * @throws ConstraintException * @throws QueryException */ public function updateByType(AccountRequest $accountRequest, bool $isEdit): int; /** * @param int $id * @param bool $isEdit * * @return int * @throws ConstraintException * @throws QueryException */ public function deleteTypeByAccountId(int $id, bool $isEdit): int; /** * @param AccountRequest $accountRequest * @param bool $isEdit * * @return int Last ID inserted * @throws ConstraintException * @throws QueryException */ public function addByType(AccountRequest $accountRequest, bool $isEdit): int; /** * @param $id int * * @return int * @throws ConstraintException * @throws QueryException */ public function deleteByAccountId(int $id): int; }