import request from "@/utils/request";

// 获取招聘信息列表 /business/hireInfo/list
export const getList = (query) => {
  return request({
    url: "/business/hireInfo/list",
    method: "get",
    params: query,
  });
};

// 获取招聘详情 /business/hireInfo/getInfo/{hireInfoId}
export const getDetail = (hireInfoId) => {
  return request({
    url: `/business/hireInfo/getInfo/${hireInfoId}`,
    method: "get",
  });
};

// 新增招聘信息 /business/hireInfo/add
export const addHireInfo = (data) => {
  return request({
    url: "/business/hireInfo/add",
    method: "post",
    data,
  });
};

// 修改招聘信息 /business/hireInfo/edit
export const editHireInfo = (data) => {
  return request({
    url: "/business/hireInfo/edit",
    method: "put",
    data,
  });
};

// 修改招聘信息状态 /business/hireInfo/updateStatus
export const editHireInfoStatus = (query) => {
  return request({
    url: "/business/hireInfo/updateStatus",
    method: "put",
    params: query,
  });
};

// 删除招聘信息 /business/hireInfo/{hireInfoIds}
export const delHireInfo = (hireInfoIds) => {
  return request({
    url: `/business/hireInfo/${hireInfoIds}`,
    method: "delete",
  });
};
