package com.usky.ems.controller.web;

import com.usky.common.core.bean.ApiResult;
import com.usky.ems.service.EmsChannelTypeService;
import com.usky.ems.service.vo.EmsChannelTypeShowVO;
import org.springframework.beans.factory.annotation.Autowired;
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;

/**
 * <p>
 * 通道类型 前端控制器
 * </p>
 *
 * @author ya
 * @since 2026-03-16
 */
@RestController
@RequestMapping("/channelType")
public class EmsChannelTypeController {

    @Autowired
    private EmsChannelTypeService emsChannelTypeService;

    /**
     * 通道配置数据查询：返回所有通道类型及其参数、参数可选值（树形结构）
     */
    @GetMapping("/show")
    public ApiResult<List<EmsChannelTypeShowVO>> show() {
        return ApiResult.success(emsChannelTypeService.show());
    }
}

