import request from "../utils/request";

// 获取彩票列表
export function getLotteryListApi(page, limit, classify) {
  return request({
    url: `/admin/lottery/${page}/${limit}?classify=${classify}`,
    method: "get",
  })
}

// 获取今日开奖通告
export function getTodayLotteryApi() {
  return request({
    url: `/admin/lottery/last`,
    method: "get",
  })
}

// 获取彩票详情
export function getLotteryDetailApi(id) {
  return request({
    url: `/admin/lottery/get/${id}`,
    method: "get",
  })
}

// 删除彩票记录
export function deleteLotteryApi(id) {
  return request({
    url: `/admin/lottery/remove/${id}`,
    method: "delete",
  })
}

// 保存彩票记录
export function saveLotteryApi(data) {
  return request({
    url: `/admin/lottery/save`,
    method: "post",
    data,
  })
}

// 更新彩票记录
export function updateLotteryApi(data) {
  return request({
    url: `/admin/lottery/update`,
    method: "put",
    data,
  })
}

