//房东端  民宿老板
import request from '@/utils/request'

/**
 * 民宿详情
 * @param {*} id 
 * @returns 
 */
 export const getHotelDetail = (id) => request(`/taHotel/${id}`)
 
/**
 * 查询指定名宿的账户
 * @param {*} params 
 * @returns 
 */
 export const getNowHotelManage = (id,params) => request(`/hotel/manage/${id}`, { params })


/**
 * 查询民宿老板的所有名宿列表
 * @param {*} params 
 * @returns 
 */
 export const getHotelManage = (params) => request('/hotel/manage/index', { params })

/**
 * 查询指定名宿的账户流水
 * @param {*} params 
 * @returns 
 */
 export const getAccountLogList = (id) => request(`/hotel/account/${id}/log`)

/**
 * 房源列表
 * @param {*} id 
 * @returns 
 */
 export const getRoomList = (params) => request('/taRoom',{params})

/**
 * 保存房源
 * @param {*} data 
 * @returns 
 */
 export const saveRoom = (data) => request('/taRoom', { method: 'post', data })

 /**
 * 删除房源
 * @param {*} data 
 * @returns 
 */
  export const deleteRoom = (id) => request(`/taRoom/${id}`, { method: 'delete'})


/**
 * 分享房源
 * @param {*} data 
 * @returns 
 */
 export const shareRoom = (data) => request('/roomOrder', { method: 'post', data })
 /**
 * 查看历史入住人列表
 * @param {*} id 
 * @returns 
 */
  export const getRoomOrderList = (params) => request('/roomOrder',{params})