package com.its.op.controller.its.scrs;

import com.its.op.dto.its.scrs.TbScSgnlIxrMngmDto;
import com.its.op.service.its.scrs.TbScSgnlIxrMngmService;
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.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "14.스마트교차로-1.관리-3.신호교차로-0.신호교차로")
@Validated
@RestController
@RequiredArgsConstructor
@RequestMapping("/api/scrs/tb_sc_sgnl_ixr_mngm")
public class TbScSgnlIxrMngmController {

    private final TbScSgnlIxrMngmService service;

    @ApiOperation(value = "신호 교차로 관리 전체조회(TB_SC_SGNL_IXR_MNGM)", response = TbScSgnlIxrMngmDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "", produces = {"application/json; charset=utf8"})
    public List<TbScSgnlIxrMngmDto> findAll() {
        return this.service.findAll();
    }

    @ApiOperation(value = "신호 교차로 관리 전체조회(TB_SC_SGNL_IXR_MNGM)", response = TbScSgnlIxrMngmDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/list", produces = {"application/json; charset=utf8"})
    public List<TbScSgnlIxrMngmDto> findAllList() {
        return this.service.findAllList();
    }

    @ApiOperation(value = "신호 교차로 관리 개별조회(TB_SC_SGNL_IXR_MNGM)", response = TbScSgnlIxrMngmDto.class)
    @GetMapping(value = "/{sgnlIxrNmbr}", produces = {"application/json; charset=utf8"})
    public TbScSgnlIxrMngmDto findById(@PathVariable("sgnlIxrNmbr") final Integer sgnlIxrNmbr) {
        return this.service.findById(sgnlIxrNmbr);
    }
//
//    @ApiOperation(value = "신호 교차로 관리 정보변경(TB_SC_SGNL_IXR_MNGM)", response = TbScSgnlIxrMngmDto.class)
//    @PutMapping(value = "/{sgnlIxrNmbr}", produces = {"application/json; charset=utf8"})
//    public TbScSgnlIxrMngmDto updateById(@PathVariable("sgnlIxrNmbr") final Integer sgnlIxrNmbr, @RequestBody @Valid final TbScSgnlIxrMngmDto.TbScSgnlIxrMngmUpdReq req) {
//        return this.service.updateById(sgnlIxrNmbr, req);
//    }
//
//    @ApiOperation(value = "신호 교차로 관리 정보변경/생성-목록(TB_SC_SGNL_IXR_MNGM)", response = TbScSgnlIxrMngmDto.class, responseContainer = "ArrayList")
//    @PostMapping(value = "", produces = {"application/json; charset=utf8"})
//    public List<TbScSgnlIxrMngmDto> mergeInfoList(@RequestBody @Valid final List<TbScSgnlIxrMngmDto.TbScSgnlIxrMngmUpdReq> listReq) {
//        return this.service.mergeInfoList(listReq);
//    }
//
//    @ApiOperation(value = "신호 교차로 관리 정보변경/생성-개별(TB_SC_SGNL_IXR_MNGM)", response = TbScSgnlIxrMngmDto.class)
//    @PostMapping(value = "/{sgnlIxrNmbr}", produces = {"application/json; charset=utf8"})
//    public TbScSgnlIxrMngmDto mergeInfo(@PathVariable("sgnlIxrNmbr") final Integer sgnlIxrNmbr, @RequestBody @Valid final TbScSgnlIxrMngmDto.TbScSgnlIxrMngmUpdReq req) {
//        return this.service.mergeInfo(req);
//    }
//
//    @ApiOperation(value = "신호 교차로 관리 정보삭제-개별(TB_SC_SGNL_IXR_MNGM)", response = TbScSgnlIxrMngmDto.class)
//    @DeleteMapping(value = "/{sgnlIxrNmbr}", produces = {"application/json; charset=utf8"})
//    public TbScSgnlIxrMngmDto deleteDataById(@PathVariable("sgnlIxrNmbr") final Integer sgnlIxrNmbr) {
//        return this.service.deleteById(sgnlIxrNmbr);
//    }
//
//    @ApiOperation(value = "신호 교차로 관리 정보삭제-목록(TB_SC_SGNL_IXR_MNGM)", response = TbScSgnlIxrMngmDto.class, responseContainer = "ArrayList")
//    @DeleteMapping(value = "", produces = {"application/json; charset=utf8"})
//    public List<TbScSgnlIxrMngmDto> deleteDataByIds(@RequestBody @Valid final List<Integer> ids) {
//        return this.service.deleteByIds(ids);
//    }

}
