import request from '@/config/axios'

// 职位标签 VO
export interface PositionTagVO {
  id: number // id
  positionId: number // 职位id
  label: string // 标签
}

// 职位标签 API
export const PositionTagApi = {
  // 查询职位标签分页
  getPositionTagPage: async (params: any) => {
    return await request.get({ url: `/menduner/system/position-tag/page`, params })
  },

  // 查询职位标签详情
  getPositionTag: async (id: number) => {
    return await request.get({ url: `/menduner/system/position-tag/get?id=` + id })
  },

  // 新增职位标签
  createPositionTag: async (data: PositionTagVO) => {
    return await request.post({ url: `/menduner/system/position-tag/create`, data })
  },

  // 修改职位标签
  updatePositionTag: async (data: PositionTagVO) => {
    return await request.put({ url: `/menduner/system/position-tag/update`, data })
  },

  // 删除职位标签
  deletePositionTag: async (id: number) => {
    return await request.delete({ url: `/menduner/system/position-tag/delete?id=` + id })
  },

  // 导出职位标签 Excel
  exportPositionTag: async (params) => {
    return await request.download({ url: `/menduner/system/position-tag/export-excel`, params })
  }
}