import request from '@/config/axios'

// 大哥数据员工业务 VO
export interface EmployeeBigBrotherVO {
  id: number // 主键id
  displayId: string // 大哥的display_id
  userIdStr: string // 大哥的用户id
  nickname: string // 大哥的用户昵称
  level: number // 大哥的等级
  hostcoins: number // 大哥打赏的金币
  followerCount: number // 大哥的粉丝数
  followingCount: number // 大哥的关注数
  region: string // 大哥所在的地区
  historicHighCoins: number // 大哥打赏的历史最高金币
  totalGiftCoins: number // 大哥历史打赏金币总和
  hostDisplayId: string // 大哥所在的直播间的主播display_id
  userId: string // 该数据所属的账号id
  operationStatus: number // 是否洽谈
}

// 大哥数据员工业务 API
export const EmployeeBigBrotherApi = {
  // 查询大哥数据员工业务分页
  getMeangeEmployeeBigBrotherPage: async (params: any) => {
    return await request.get({ url: `/server/employee-big-brother/page`, params })
  },
  // 查询管理大哥数据员工业务分页
  getEmployeeBigBrotherPage: async (params: any) => {
    return await request.get({ url: `/server/employee-big-brother/self_page`, params })
  },
 
  // 批量修改大哥数据
  batchUpdateBigBrother: async (data: EmployeeBigBrotherVO[]) => {
    return await request.put({ url: `/server/employee-big-brother/batch_update`, data })
  },
  // 查询大哥数据员工业务详情
  getEmployeeBigBrother: async (id: number) => {
    return await request.get({ url: `/server/employee-big-brother/get?id=` + id })
  },

  // 新增大哥数据员工业务
  createEmployeeBigBrother: async (data: EmployeeBigBrotherVO) => {
    return await request.post({ url: `/server/employee-big-brother/create`, data })
  },

  // 修改大哥数据员工业务
  updateEmployeeBigBrother: async (data) => {
    return await request.put({ url: `/server/employee-big-brother/update`, data })
  },

  // 删除大哥数据员工业务
  deleteEmployeeBigBrother: async (id: number) => {
    return await request.delete({ url: `/server/employee-big-brother/delete?id=` + id })
  },
  // 批量删除大哥数据员工业务
  deleteEmployeeBigBrotherList: async (ids: number[]) => {
    return await request.delete({ url: `/server/employee-big-brother/delete-list` ,  params: { ids: ids.join(',') }  })
  }, 
  
  // 导出大哥数据员工业务 Excel
  exportEmployeeBigBrother: async (params) => {
    return await request.download({ url: `/server/employee-big-brother/export-excel`, params })
  }
}