import type * as Recharge from "./types/recharge"
import { request } from "@/utils/service"

/** 交易流水列表 */
export function getPayList(params: IApiTableRequestData) {
  return request<Recharge.GetPayListResponseData>({
    method: "get",
    url: "/api/fund/tx/list",
    params
  })
}

/** 新增交易 */
export function addPay(data: Recharge.IPaySaveRequestData) {
  return request<IRequestResult<null>>({
    method: "post",
    url: "/api/fund/tx/add",
    data
  })
}

/** 编辑交易 */
export function editPay(data: Recharge.IPaySaveRequestData) {
  return request<IRequestResult<null>>({
    method: "post",
    url: "/api/fund/tx/edit",
    data
  })
}
