package com.its.op.controller.its.dashboard;

import com.its.op.dto.its.dashboard.CmtrGradCountSttsDto;
import com.its.op.service.its.dashboard.DashboardService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "00.공통-03.DASHBOARD")
@Validated
@RestController
@RequiredArgsConstructor
@RequestMapping("/api/common/dashboard")
public class DashboardController {

    private final DashboardService service;

    @ApiOperation(value = "소통등급갯수상태-링크", response = CmtrGradCountSttsDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/cmtr-grad-count-stts/link", produces = {"application/json; charset=utf8"})
    public List<CmtrGradCountSttsDto> findAllCmtrGradCountSttsLink() {
        return this.service.findAllCmtrGradCountSttsLink();
    }

    @ApiOperation(value = "소통등급갯수상태-정보제공구간", response = CmtrGradCountSttsDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/cmtr-grad-count-stts/ifsc", produces = {"application/json; charset=utf8"})
    public List<CmtrGradCountSttsDto> findAllCmtrGradCountSttsIfsc() {
        return this.service.findAllCmtrGradCountSttsIfsc();
    }

    @ApiOperation(value = "소통등급갯수상태-도로", response = CmtrGradCountSttsDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/cmtr-grad-count-stts/road", produces = {"application/json; charset=utf8"})
    public List<CmtrGradCountSttsDto> findAllCmtrGradCountSttsRoad() {
        return this.service.findAllCmtrGradCountSttsRoad();
    }

}
