import service from '@/utils/request'

// @Tags RedPackage
// @Summary 创建RedPackage
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.RedPackage true "创建RedPackage"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /红包/createRedPackage [post]
export const createRedPackage = (data) => {
  return service({
    url: '/红包/createRedPackage',
    method: 'post',
    data
  })
}

// @Tags RedPackage
// @Summary 删除RedPackage
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.RedPackage true "删除RedPackage"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /红包/deleteRedPackage [delete]
export const deleteRedPackage = (data) => {
  return service({
    url: '/红包/deleteRedPackage',
    method: 'delete',
    data
  })
}

// @Tags RedPackage
// @Summary 删除RedPackage
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除RedPackage"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /红包/deleteRedPackage [delete]
export const deleteRedPackageByIds = (data) => {
  return service({
    url: '/红包/deleteRedPackageByIds',
    method: 'delete',
    data
  })
}

// @Tags RedPackage
// @Summary 更新RedPackage
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.RedPackage true "更新RedPackage"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /红包/updateRedPackage [put]
export const updateRedPackage = (data) => {
  return service({
    url: '/红包/updateRedPackage',
    method: 'put',
    data
  })
}

// @Tags RedPackage
// @Summary 用id查询RedPackage
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.RedPackage true "用id查询RedPackage"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /红包/findRedPackage [get]
export const findRedPackage = (params) => {
  return service({
    url: '/红包/findRedPackage',
    method: 'get',
    params
  })
}

// @Tags RedPackage
// @Summary 分页获取RedPackage列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取RedPackage列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /红包/getRedPackageList [get]
export const getRedPackageList = (params) => {
  return service({
    url: '/红包/getRedPackageList',
    method: 'get',
    params
  })
}
