package com.its.api.its.controller.cctv;

import com.its.api.its.model.dto.cctv.TbCctvSttsDto;
import com.its.api.its.service.cctv.TbCctvCtlrService;
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 = "11.CCTV-2.CCTV 상태 모니터링")
@Validated
@RestController
@RequiredArgsConstructor
@RequestMapping("/api/cctv/monitoring/stts")
public class TbCctvSttsController {

    private final TbCctvCtlrService service;

    @ApiOperation(value = "CCTV 상태 전체조회(TB_CCTV_STTS)", response = TbCctvSttsDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "", produces = {"application/json; charset=utf8"})
    public List<TbCctvSttsDto> findAll() {
        return this.service.findAllStts();
    }

}
