package com.its.api.its.controller.management;

import com.its.api.its.model.dto.unit.TbUnitSystSttsDto;
import com.its.api.its.service.unit.TbUnitSystService;
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 = "00.교통상황관리-0.메인-1.프로세스 상태정보")
@Validated
@RestController
@RequiredArgsConstructor
@RequestMapping("/api/manage/main/process")
public class UnitSystController {

    private final TbUnitSystService service;

    @ApiOperation(value = "프로세스 상태(TB_UNIT_SYST_STTS)", response = TbUnitSystSttsDto.class, responseContainer = "ArrayList")
    @GetMapping(value = "/stts", produces = {"application/json; charset=utf8"})
    public List<TbUnitSystSttsDto> findAllProcessStts() {
        return this.service.findAllStts();
    }

}
