import request from "@/utils/httpRequest";
import { PUBLIC_MODULES_PATH as prefix } from "../AppPath";

export default class HolidayService{
	list (param) {
		return request({
			url: prefix +'/holiday/findList',
			method: 'get',
			params: param
		})
	}

	saveForm (inputForm) {
		return request({
			url: prefix + `/holiday/saveForm`,
			method: 'post',
			data: inputForm
		})
	}

	queryById (id) {
		return request({
			url: prefix +'/holiday/findById',
			method: 'get',
			params: {id: id}
		})
	}

	updateStatusById(data) {
		return request({
			url: prefix + "/holiday/updateStatusById",
			method: "post",
			data: data,
		})
	}
	delete (ids) {
		return request({
			url: prefix+"/holiday/delete",
			method: 'delete',
			params: {id: ids}
		})
	}


	adminEditForm(param){
		return request({
			url: prefix + "/holiday/adminEditForm",
			method: "post",
			data: param,
		})
	}

	checkType (inputForm) {
		return request({
			url: prefix + `/holiday/checkType`,
			method: 'post',
			data: inputForm
		})
	}

	exportFile(params) {
		return request({
			url: prefix + "/holiday/export",
			method: "get",
			params: params,
			responseType: "blob",
		});
	}

}
