package com.huimv.lamp.dao.repo;

import com.huimv.lamp.dao.entity.LampEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

public interface LampRepo extends JpaRepository<LampEntity, Integer>, JpaSpecificationExecutor<LampEntity> {

    @Query(nativeQuery = true,value="SELECT * FROM lamp limit 1")
    LampEntity getLightness();
}