package com.microservices.pms.project.controller;

import com.microservices.common.core.web.controller.BaseController;
import com.microservices.common.core.web.page.TableDataInfo;
import com.microservices.pms.project.domain.PmsProjectTestcaseType;
import com.microservices.pms.project.service.IPmsProjectTestcaseTypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
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;

/**
 * 测试用例类型管理Controller
 *
 * @author otto
 * @date 2023-11-22
 */
@RestController
@Api(tags = "项目管理-测试用例类型管理")
@RequestMapping("/{enterpriseIdentifier}/pmsProjectTestcaseType")
@ApiImplicitParams({
        @ApiImplicitParam(name = "enterpriseIdentifier", value = "企业标识", paramType = "path", dataType = "String")
})
public class PmsProjectTestcaseTypeController extends BaseController {
    @Autowired
    private IPmsProjectTestcaseTypeService pmsProjectTestcaseTypeService;

    /**
     * 查询测试用例类型管理列表
     */
    @GetMapping("/list")
    @ApiOperation(value = "查询测试用例类型列表")
    public TableDataInfo list(PmsProjectTestcaseType pmsProjectTestcaseType) {
        startPage();
        List<PmsProjectTestcaseType> list = pmsProjectTestcaseTypeService.selectPmsProjectTestcaseTypeList(pmsProjectTestcaseType);
        return getDataTable(list);
    }
}
