import request from '@/config/axios'

// 分销用户身价 VO
export interface SocialStatusVO {
  // 用户编号
  id: number
  // 身价等级
  level: string
  // 身价名称
  name: string
  // 升级所需点数
  point: number
}

// 分销用户身价 API
export const SocialStatusApi = {
  // 查询分销用户身价分页
  getSocialStatusPage: async (params: any) => {
    return await request.get({ url: `/distri/social-status/page`, params })
  },

  // 查询分销用户身价详情
  getSocialStatus: async (id: number) => {
    return await request.get({ url: `/distri/social-status/get?id=` + id })
  },

  // 新增分销用户身价
  createSocialStatus: async (data: SocialStatusVO) => {
    return await request.post({ url: `/distri/social-status/create`, data })
  },

  // 修改分销用户身价
  updateSocialStatus: async (data: SocialStatusVO) => {
    return await request.put({ url: `/distri/social-status/update`, data })
  },

  // 删除分销用户身价
  deleteSocialStatus: async (id: number) => {
    return await request.delete({ url: `/distri/social-status/delete?id=` + id })
  },

  // 导出分销用户身价 Excel
  exportSocialStatus: async (params) => {
    return await request.download({ url: `/distri/social-status/export-excel`, params })
  }
}