import request from '@/config/axios'

export interface CumulativeSignInConfigVO {
  id: number
  totalDays: number
  rewardAmount : number
  comment: string
}

// 查询累计签到配置列表
export const getCumulativeSignInConfigPage = async (params) => {
  return await request.get({ url: `/member/cumulative-sign-in-config/page`, params })
}

// 查询累计签到配置详情
export const getCumulativeSignInConfig = async (id: number) => {
  return await request.get({ url: `/member/cumulative-sign-in-config/get?id=` + id })
}

// 新增累计签到配置
export const createCumulativeSignInConfig = async (data: CumulativeSignInConfigVO) => {
  return await request.post({ url: `/member/cumulative-sign-in-config/create`, data })
}

// 修改累计签到配置
export const updateCumulativeSignInConfig = async (data: CumulativeSignInConfigVO) => {
  return await request.put({ url: `/member/cumulative-sign-in-config/update`, data })
}

// 删除累计签到配置
export const deleteCumulativeSignInConfig = async (id: number) => {
  return await request.delete({ url: `/member/cumulative-sign-in-config/delete?id=` + id })
}

// 导出累计签到配置 Excel
export const exportCumulativeSignInConfig = async (params) => {
  return await request.download({ url: `/member/cumulative-sign-in-config/export-excel`, params })
}
