import request from '@/config/axios'

// 薪资档案选项 VO
export interface SalaryArchivesOptionVO {
  id: number // 主键
  employeeId: number // 员工id
  isPro: number // 是否是试用期 0 正式 1 试用期
  code: number // 薪资项code
  name: string // 薪资项名称
  value: string // 薪资
}

// 薪资档案选项 API
export const SalaryArchivesOptionApi = {
  // 查询薪资档案选项分页
  getSalaryArchivesOptionPage: async (params: any) => {
    return await request.get({ url: `/hr/salary-archives-option/page`, params })
  },

  // 查询薪资档案选项详情
  getSalaryArchivesOption: async (id: number) => {
    return await request.get({ url: `/hr/salary-archives-option/get?id=` + id })
  },

  // 新增薪资档案选项
  createSalaryArchivesOption: async (data: SalaryArchivesOptionVO) => {
    return await request.post({ url: `/hr/salary-archives-option/create`, data })
  },

  // 修改薪资档案选项
  updateSalaryArchivesOption: async (data: SalaryArchivesOptionVO) => {
    return await request.put({ url: `/hr/salary-archives-option/update`, data })
  },

  // 删除薪资档案选项
  deleteSalaryArchivesOption: async (id: number) => {
    return await request.delete({ url: `/hr/salary-archives-option/delete?id=` + id })
  },

  // 导出薪资档案选项 Excel
  exportSalaryArchivesOption: async (params) => {
    return await request.download({ url: `/hr/salary-archives-option/export-excel`, params })
  },
}
