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.CueBrandVO;
import com.tmerclub.cloud.cuerecycle.service.CueBrandService;
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("appCueBrandController")
@RequestMapping("/app/cueBrand")
public class CueBrandController {

    @Resource
    CueBrandService cueBrandService;

    /**
     * 分页查询启用球杆品牌列表
     *
     * @param pageDTO 分页参数
     * @return 球杆品牌分页列表
     */
    @GetMapping("/listEnabled")
    @Operation(summary = "分页查询启用球杆品牌列表", description = "分页查询启用球杆品牌列表")
    public ServerResponseEntity<PageVO<CueBrandVO>> listEnabled(@Valid PageDTO pageDTO) {
        PageVO<CueBrandVO> cueBrandPage = cueBrandService.listEnabled(pageDTO);
        return ServerResponseEntity.success(cueBrandPage);
    }
}