package com.tmerclub.cloud.cuerecycle.controller.app;

import com.tmerclub.cloud.common.database.dto.PageDTO;
import com.tmerclub.cloud.common.database.vo.PageVO;
import com.tmerclub.cloud.common.response.ServerResponseEntity;
import com.tmerclub.cloud.cuerecycle.model.vo.CueTypeVO;
import com.tmerclub.cloud.cuerecycle.service.CueTypeService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import jakarta.validation.Valid;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 球杆类型
 *
 * @author: frank
 * @create: 2025-04-10
 **/
@Tag(name = "App-球杆类型")
@RestController("appCueTypeController")
@RequestMapping("/app/cueType")
public class CueTypeController {

    @Resource
    CueTypeService cueTypeService;


    /**
     * 分页查询启用球杆类型列表
     *
     * @param pageDTO 分页参数
     * @return 分页数据
     */
    @GetMapping("/listEnabled")
    @Operation(summary = "分页查询启用球杆类型列表", description = "分页查询启用球杆类型列表")
    public ServerResponseEntity<PageVO<CueTypeVO>> listEnabled(@Valid PageDTO pageDTO) {
        PageVO<CueTypeVO> cueTypePage = cueTypeService.listEnabled(pageDTO);
        return ServerResponseEntity.success(cueTypePage);
    }
}