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.dto.CueSeriesDTO;
import com.tmerclub.cloud.cuerecycle.model.vo.CueSeriesVO;
import com.tmerclub.cloud.cuerecycle.service.CueSeriesService;
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("appCueSeriesController")
@RequestMapping("/app/cueSeries")
public class CueSeriesController {

    @Resource
    CueSeriesService cueSeriesService;

    /**
     * 分页查询启用球杆系列列表
     *
     * @param pageDTO      分页参数
     * @param cueSeriesDTO 查询参数
     * @return 分页数据
     */
    @GetMapping("/listByBrand")
    @Operation(summary = "分页查询启用球杆系列列表", description = "分页查询启用球杆系列列表")
    public ServerResponseEntity<PageVO<CueSeriesVO>> listByBrand(@Valid PageDTO pageDTO, CueSeriesDTO cueSeriesDTO) {
        PageVO<CueSeriesVO> cueSeriesPage = cueSeriesService.listByBrand(pageDTO, cueSeriesDTO);
        return ServerResponseEntity.success(cueSeriesPage);
    }
}