import service from '@/utils/request'

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

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

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

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

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

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