import request from '@/config/axios'

export interface ContinuousSignInConfigVO {
  id: number
  continuousDays: number
  rewardAmount : number
  comment: string
}

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

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

// 新增连续签到配置
export const createContinuousSignInConfig = async (data: ContinuousSignInConfigVO) => {
  return await request.post({ url: `/member/continuous-sign-in-config/create`, data })
}

// 修改连续签到配置
export const updateContinuousSignInConfig = async (data: ContinuousSignInConfigVO) => {
  return await request.put({ url: `/member/continuous-sign-in-config/update`, data })
}

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

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