package com.example.removetolocal.newentity.dao;

import com.example.removetolocal.newentity.entity.DeviceCheckPeriod;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

/**
 * DeviceCheckPeriodDao.
 *
 * @author Matrix <xhyrzldf@gmail.com>
 * @since 2020/10/26 at 5:10 下午
 */
public interface DeviceCheckPeriodDao extends JpaRepository<DeviceCheckPeriod, Integer>, JpaSpecificationExecutor<DeviceCheckPeriod> {

    /**
     * @return 最新的一条周期数据
     */
    DeviceCheckPeriod findTopByOrderByIdDesc();
}
