import request from '@/config/axios'

// 平台每日提现记录 VO
export interface PtDailyWithdrawalVO {
  // 记录id
  id: number
  // 提现金额,单位:元
  amount: number
  // 提现笔数
  count: number
  // 提现状态,0:待转账 1:全部完成 2:部分完成
  status: number
  // 提现开始时间
  startTime: Date
  // 提现截止时间
  endTime: Date
}

// 平台每日提现记录 API
export const PtDailyWithdrawalApi = {
  // 查询平台每日提现记录分页
  getPtDailyWithdrawalPage: async (params: any) => {
    return await request.get({ url: `/distri/pt-daily-withdrawal/page`, params })
  },

  // 查询平台每日提现记录详情
  getPtDailyWithdrawal: async (id: number) => {
    return await request.get({ url: `/distri/pt-daily-withdrawal/get?id=` + id })
  },

  // 新增平台每日提现记录
  createPtDailyWithdrawal: async (data: PtDailyWithdrawalVO) => {
    return await request.post({ url: `/distri/pt-daily-withdrawal/create`, data })
  },

  // 修改平台每日提现记录
  updatePtDailyWithdrawal: async (data: PtDailyWithdrawalVO) => {
    return await request.put({ url: `/distri/pt-daily-withdrawal/update`, data })
  },

  // 删除平台每日提现记录
  deletePtDailyWithdrawal: async (id: number) => {
    return await request.delete({ url: `/distri/pt-daily-withdrawal/delete?id=` + id })
  },

  // 导出平台每日提现记录 Excel
  exportPtDailyWithdrawal: async (params) => {
    return await request.download({ url: `/distri/pt-daily-withdrawal/export-excel`, params })
  }
}