package com.reyun.repository;
import com.reyun.model.PackageType;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

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);
}
