import request from '@/config/axios'

export interface DailySignInConfigVO {
  id: number
  dayOfMonth: number
  rewardAmount : number
  comment: string
}

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

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

// 新增每日签到配置
export const createDailySignInConfig = async (data: DailySignInConfigVO) => {
  return await request.post({ url: `/member/daily-sign-in-config/create`, data })
}

// 修改每日签到配置
export const updateDailySignInConfig = async (data: DailySignInConfigVO) => {
  return await request.put({ url: `/member/daily-sign-in-config/update`, data })
}

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

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