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

import com.its.op.dto.its.cctv.TbCctvCtlrDto;
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-0.공통")
@Validated
@RestController
@RequiredArgsConstructor
@RequestMapping("/api/cctv/common")
public class CctvCommonController {

    private final TbCctvCtlrService service;

    @ApiOperation(value = "CCTV 목록 조회-삭제되지 않은(TB_CCTV_CTLR)", response = TbCctvCtlrDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/cctv-list", produces = {"application/json; charset=utf8"})
    public List<TbCctvCtlrDto> findAllCctvList() {
        return this.service.findAllList();
    }

}
