package com.inspect.calender.service.impl;

import com.inspect.calender.domain.DailyTaskStatsDTO;
import com.inspect.calender.domain.MonthlyTaskStatsDTO;
import com.inspect.calender.service.CalenderService;
import com.inspect.calender.service.TaskCalendarGenerator;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class CalenderServiceImpl implements CalenderService {
    @Resource
    private TaskCalendarGenerator taskCalendarGenerator;

    @Override
    public List<MonthlyTaskStatsDTO> getMonthlyStatsByYear(Integer year) {
        return taskCalendarGenerator.getMonthlyStatsByYear(year);
    }

    @Override
    public List<DailyTaskStatsDTO> getDailyStatsByYearAndMonth(Integer year, Integer month) {
        return taskCalendarGenerator.getFullCalendar(year, month);
    }

    @Override
    public List<DailyTaskStatsDTO> getDailyStatsByYearAndMonthAndDay(Integer year, Integer month, Integer day) {
        return taskCalendarGenerator.getFullCalendar(year, month, day);
    }
}
