package tkio.repository;

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

public interface PackageTypeRepository 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);
}
