import http from './index.js';

// 分页查询房源信息
export const pageHouseInfo = (params) => http.get('/house/info/page', {params})

// 查询全部房源信息
export const listHouseInfo = (params) => http.get('/house/info', {params})

// 查询房源信息(当期登录用户)
export const getHouseInfo = (userId) => http.get('/house/info/' + userId)

// 查询会员资料
export const getUserDetail = (userId) => http.get('/house/info/detail/' + userId)

// 新增房源信息
export const addHouseInfo = (data) => http.post('/house/info', data)

// 编辑房源信息
export const updateHouseInfo = (data) => http.put('/house/info', data)

// 删除房源信息
export const removeHouseInfo = (id) => http.delete('/house/info/' + id)

export default {
	pageHouseInfo,
	listHouseInfo,
	getHouseInfo,
	getUserDetail,
	updateHouseInfo,
	removeHouseInfo,
	addHouseInfo
}
