package com.rehome.jpahefengweather.service.Impl;

import com.rehome.jpahefengweather.dao.ForecastWeatherRepository;
import com.rehome.jpahefengweather.dao.NmcForecastWeatherRepository;
import com.rehome.jpahefengweather.dao.NmcNowWeatherRepository;
import com.rehome.jpahefengweather.dao.NowWeatherRepository;
import com.rehome.jpahefengweather.entity.NmcForecastWeather;
import com.rehome.jpahefengweather.entity.NmcNowWeather;
import com.rehome.jpahefengweather.service.NmcWeatherService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

@Service
public class NmcWeatherServiceImpl implements NmcWeatherService {
    @Resource
    private NmcNowWeatherRepository nmcNowWeatherRepository;
    @Resource
    private NmcForecastWeatherRepository nmcForecastWeatherRepository;


    @Override
    public void saveNowWeather(NmcNowWeather nowWeather) {
        this.nmcNowWeatherRepository.save(nowWeather);
    }

    @Override
    public void saveForecastWeather(NmcForecastWeather forecastWeather) {
        this.nmcForecastWeatherRepository.save(forecastWeather);
    }
}
