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

import com.arms.api.report.fulldata.model.vo.AssigneeIssueCountVO;
import com.arms.api.report.fulldata.model.dto.FullDataRequestDTO;
import com.arms.api.report.fulldata.service.ReportService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/engine/report")
@Slf4j
public class ReportController {

    @Autowired
    private ReportService reportService;

    @GetMapping("/resource-list")
    public ResponseEntity<?> 작업자_목록_가져오기() {
        return ResponseEntity.ok(reportService.작업자_목록_가져오기());
    }

    @GetMapping("/issue-list")
    public ResponseEntity<?> retrieveFullDataIssueList(FullDataRequestDTO fullDataRequestDTO) {
        return ResponseEntity.ok(reportService.retrieveFullDataIssueList(fullDataRequestDTO));
    }

    @GetMapping("/issue-list-calendar")
    public ResponseEntity<?> retrieveCalendarData(FullDataRequestDTO fullDataRequestDTO) {
        return ResponseEntity.ok(reportService.retrieveCalendarData(fullDataRequestDTO));
    }

    @GetMapping("/req-issue-list")
    public ResponseEntity<?> getReqIssueList(FullDataRequestDTO fullDataRequestDTO) {
        return ResponseEntity.ok(reportService.getReqIssueList(fullDataRequestDTO));
    }

    @GetMapping("/assignee-report")
    public ResponseEntity<AssigneeIssueCountVO> getAssigneeAggregationList(FullDataRequestDTO fullDataRequestDTO) {
        return ResponseEntity.ok(reportService.getAssigneeAggregationList(fullDataRequestDTO));
    }

}
