import request from '@/utils/request'

// 团购列表（分页）
export function listProductGroupBuy(query) {
  return request({
    url: '/store/store/productGroupBuy/list',
    method: 'get',
    params: query
  })
}

// 团购详情（含团员+订单状态）
export function getProductGroupBuy(id) {
  return request({
    url: '/store/store/productGroupBuy/' + id,
    method: 'get'
  })
}

// 按商品ID查历史拼团
export function listGroupBuyByProduct(productId) {
  return request({
    url: '/store/store/productGroupBuy/listByProduct/' + productId,
    method: 'get'
  })
}

// 团员列表（可单独查）
export function listGroupBuyMembers(id) {
  return request({
    url: '/store/store/productGroupBuy/members/' + id,
    method: 'get'
  })
}
