package com.huimv.env.dao.repo;

import com.huimv.env.dao.entity.EnvironmentDataEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

public interface EnvironmentDataEntityRepository extends JpaRepository<EnvironmentDataEntity, Integer>, JpaSpecificationExecutor<EnvironmentDataEntity> {

    @Query(nativeQuery = true, value = "select * from environment_data order by id desc limit 1")
    EnvironmentDataEntity getOneLastEnvData();
}