import request from '@/config/axios'

export interface EnterprisePointsVO {
  userId: string,
  point: number,
  operation: string,
  enterpriseId: string
}

export interface EnterpriseBalanceVO {
  userId: string,
  balance: number,
  operation: string,
  enterpriseId: string
}

// 获取用户积分分页
export const getEnterpriseAccountPage = async (params) => {
  return await request.get({ url: `/menduner/system/enterprise-account/page`, params })
}

// 更新账户积分
export const updateEnterpriseUserPoints = async (data) => {
  return await request.put({ url: `/menduner/system/enterprise-account/update-point`, data })
}

// 更新账户余额
export const updateEnterpriseUserBalance = async (data) => {
  return await request.put({ url: `/menduner/system/enterprise-account/update-balance`, data })
}

// 获取企业用户账户变动记录分页
export const getEnterpriseUserAccountRecordPage = async (params) => {
  return await request.get({ url: `/menduner/system/enterprise/account/record/page`, params })
}