// 房源管理
import request from "@/utils/request";

/**
 * 房源列表
 * @param {*} data
 * @returns
 */
export function list(data) {
  return request({
    url: "/housingResources/housingResources/list",
    method: "post",
    data: data,
  });
}

/**
 * 房源创建
 * @param {*} data
 * @returns
 */
export function add(data) {
  return request({
    url: "/housingResources/housingResources",
    method: "post",
    data: data,
  });
}

/**
 * 房源上下架
 * @param {*} data
 * @returns
 */
export function offShelf(data) {
  return request({
    url: "/housingResources/housingResources/offShelf",
    method: "put",
    data: data,
  });
}

/**
 * 房源修改
 * @param {*} data 
 * @returns 
 */
export function update(data) {
  return request({
    url: "/housingResources/housingResources/update",
    method: "put",
    data: data,
  });
}



export function housingImport(data) {
  return request({
    url: "/housingResources/housingResourcesBatch",
    method: "post",
    data: data,
  });
}