package com.its.op.controller.its.cctv;

import com.its.op.dto.its.cctv.TbCctvCtlrSttsDto;
import com.its.op.service.its.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 TbCctvCtlrSttsController {

    private final TbCctvCtlrService service;

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

}
