import request from '@/config/axios'

export const talentPositionApi = {
	// 职位列表
	getTHotelPositionsList: async () => {
		return await request.get({ 
			url: `/api/parse/get-hotel-positions-list`, 
			baseURL: import.meta.env.VITE_BASE_URL
		})
	},

	// 创建职位
	createHotelPosition: async (data: any) => {
		return await request.post({ 
			url: `/api/parse/add-hotel-positions`, 
			data, 
			baseURL: import.meta.env.VITE_BASE_URL
		})
	},

	// 更新职位
	updateHotelPosition: async (position_id: number, data: any) => {
		return await request.put({ 
			url: `/api/parse/update-hotel-positions/${position_id}`, 
			data, 
			baseURL: import.meta.env.VITE_BASE_URL 
		})
	},

	// 删除职位
	deleteHotelPosition: async (position_id: number) => {
		return await request.delete({ 
			url: `/api/parse/delete-hotel-positions/${position_id}`, 
			baseURL: import.meta.env.VITE_BASE_URL 
		})
	}
}