package com.YuyeTech.HeartRate.game.cHistoricalCalorie.repository;

import com.YuyeTech.HeartRate.common.repository.*;
import com.YuyeTech.HeartRate.game.cHistoricalCalorie.projo.CHistoricalCalorie;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.Optional;

@Repository
public interface CHistoricalCalorieRepository extends CommonRepository<CHistoricalCalorie, Integer> {
    @Query(value = "select * from c_historical_calorie where TO_DAYS(create_time) = TO_DAYS(NOW())",nativeQuery = true)
    Optional<CHistoricalCalorie> findByCreateTime();
}
