package com.arms.api.report.weekly.controller;

import com.arms.api.report.weekly.model.dto.ReportRequestDTO;
import com.arms.api.report.weekly.model.vo.PerformanceVO;
import com.arms.api.report.weekly.service.WeeklyService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/report/personal-performance")
@AllArgsConstructor
public class PerformanceController {

    private final WeeklyService weeklyService;

    @PostMapping("/data")
    public ResponseEntity<PerformanceVO> performanceData(@RequestBody ReportRequestDTO reportRequestDTO) {
        return ResponseEntity.ok(weeklyService.getPerformanceData(reportRequestDTO));
    }
}
