package com.its.api.its.controller.common;

import com.its.api.its.model.dto.code.TbClctSystStupDto;
import com.its.api.its.service.code.TbClctSystStupService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
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;

@Slf4j
@RequiredArgsConstructor
@RestController
@RequestMapping("/api/its/common")
@Api(tags = "00.공통")
public class CommonController {

    private final TbClctSystStupService clctSystStupService;

    // /api/database/clct-syst-stup 와 동일
    @ApiOperation(value = "수집시스템 조회(TB_CLCT_SYST_STUP)", response = TbClctSystStupDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/clct-syst-stup", produces = {"application/json; charset=utf8"})
    public List<TbClctSystStupDto> findAllClctSystStup() {
        return this.clctSystStupService.findAll();
    }

}
