package userio.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import userio.model.PackageType;

public interface IOPackageTypeRepository extends JpaRepository<PackageType, Long> {
    @Query(value = "select * from package_type where id=(select pricelevel from account  where id=?1)", nativeQuery = true)
    PackageType findPackageTypeByRootParent(Long rootParent);

    @Query(value = "select * from package_type where id=?1", nativeQuery = true)
    PackageType findPackageTypeByID(Long ID);
}
