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

import com.its.op.dto.its.scrs.TbScWeekHmsCntlDto;
import com.its.op.service.its.scrs.TbScWeekHmsCntlService;
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.관리-4.신호교차로 그룹-2.주간 시각 제어")
@Validated
@RestController
@RequiredArgsConstructor
@RequestMapping("/api/scrs/tb_sc_week_hms_cntl")
public class TbScWeekHmsCntlController {

    private final TbScWeekHmsCntlService service;

    @ApiOperation(value = "주간 시각 제어 전체조회(TB_SC_WEEK_HMS_CNTL)", response = TbScWeekHmsCntlDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "", produces = {"application/json; charset=utf8"})
    public List<TbScWeekHmsCntlDto> findAll() {
        return this.service.findAll();
    }

    @ApiOperation(value = "주간 시각 제어 전체조회(TB_SC_WEEK_HMS_CNTL)", response = TbScWeekHmsCntlDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/list", produces = {"application/json; charset=utf8"})
    public List<TbScWeekHmsCntlDto> findAllList() {
        return this.service.findAllList();
    }

    @ApiOperation(value = "주간 시각 제어 개별조회(TB_SC_WEEK_HMS_CNTL)", response = TbScWeekHmsCntlDto.class)
    @GetMapping(value = "/{ixrGrop}", produces = {"application/json; charset=utf8"})
    public TbScWeekHmsCntlDto findById(@PathVariable("ixrGrop") final Integer ixrGrop) {
        return this.service.findById(ixrGrop);
    }
//
//    @ApiOperation(value = "주간 시각 제어 정보변경(TB_SC_WEEK_HMS_CNTL)", response = TbScWeekHmsCntlDto.class)
//    @PutMapping(value = "/{ixrGrop}", produces = {"application/json; charset=utf8"})
//    public TbScWeekHmsCntlDto updateById(@PathVariable("ixrGrop") final Integer ixrGrop, @RequestBody @Valid final TbScWeekHmsCntlDto.TbScWeekHmsCntlUpdReq req) {
//        return this.service.updateById(ixrGrop, req);
//    }
//
//    @ApiOperation(value = "주간 시각 제어 정보변경/생성-목록(TB_SC_WEEK_HMS_CNTL)", response = TbScWeekHmsCntlDto.class, responseContainer = "ArrayList")
//    @PostMapping(value = "", produces = {"application/json; charset=utf8"})
//    public List<TbScWeekHmsCntlDto> mergeInfoList(@RequestBody @Valid final List<TbScWeekHmsCntlDto.TbScWeekHmsCntlUpdReq> listReq) {
//        return this.service.mergeInfoList(listReq);
//    }
//
//    @ApiOperation(value = "주간 시각 제어 정보변경/생성-개별(TB_SC_WEEK_HMS_CNTL)", response = TbScWeekHmsCntlDto.class)
//    @PostMapping(value = "/{ixrGrop}", produces = {"application/json; charset=utf8"})
//    public TbScWeekHmsCntlDto mergeInfo(@PathVariable("ixrGrop") final Integer ixrGrop, @RequestBody @Valid final TbScWeekHmsCntlDto.TbScWeekHmsCntlUpdReq req) {
//        return this.service.mergeInfo(req);
//    }
//
//    @ApiOperation(value = "주간 시각 제어 정보삭제-개별(TB_SC_WEEK_HMS_CNTL)", response = TbScWeekHmsCntlDto.class)
//    @DeleteMapping(value = "/{ixrGrop}", produces = {"application/json; charset=utf8"})
//    public TbScWeekHmsCntlDto deleteDataById(@PathVariable("ixrGrop") final Integer ixrGrop) {
//        return this.service.deleteById(ixrGrop);
//    }
//
//    @ApiOperation(value = "주간 시각 제어 정보삭제-목록(TB_SC_WEEK_HMS_CNTL)", response = TbScWeekHmsCntlDto.class, responseContainer = "ArrayList")
//    @DeleteMapping(value = "", produces = {"application/json; charset=utf8"})
//    public List<TbScWeekHmsCntlDto> deleteDataByIds(@RequestBody @Valid final List<Integer> ids) {
//        return this.service.deleteByIds(ids);
//    }

}
