. */ namespace SP\Domain\Account\Ports; use SP\Domain\Common\Ports\Repository; use SP\Domain\Core\Exceptions\ConstraintException; use SP\Domain\Core\Exceptions\QueryException; use SP\Infrastructure\Database\QueryResult; /** * Class AccountToUserGroupRepository * * @package SP\Infrastructure\Account\Repositories */ interface AccountToUserGroupRepository extends Repository { /** * 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 ConstraintException * @throws QueryException */ public function getUserGroupsByUserGroupId(int $id): QueryResult; /** * @param $id int * * @return bool * @throws ConstraintException * @throws QueryException */ public function deleteByUserGroupId(int $id): bool; /** * @param int $id * @param bool $isEdit * * @return void * @throws ConstraintException * @throws QueryException */ public function deleteTypeByAccountId(int $id, bool $isEdit): void; /** * @param int $accountId * @param array $items * @param bool $isEdit * * @return void * @throws ConstraintException * @throws QueryException */ public function addByType(int $accountId, array $items, bool $isEdit = false): void; /** * @param $id int * * @return bool * @throws ConstraintException * @throws QueryException */ public function deleteByAccountId(int $id): bool; }