62 lines
1.4 KiB
TypeScript
62 lines
1.4 KiB
TypeScript
import type { BookingVO, BookingForm, BookingQuery } from './model';
|
|
|
|
import type { ID, IDS } from '#/api/common';
|
|
import type { PageResult } from '#/api/common';
|
|
|
|
import { commonExport } from '#/api/helper';
|
|
import { requestClient } from '#/api/request';
|
|
|
|
/**
|
|
* 查询会议预约列表
|
|
* @param params
|
|
* @returns 会议预约列表
|
|
*/
|
|
export function bookingList(params?: BookingQuery) {
|
|
return requestClient.get<PageResult<BookingVO>>('/property/booking/list', { params });
|
|
}
|
|
|
|
/**
|
|
* 导出会议预约列表
|
|
* @param params
|
|
* @returns 会议预约列表
|
|
*/
|
|
export function bookingExport(params?: BookingQuery) {
|
|
return commonExport('/property/booking/export', params ?? {});
|
|
}
|
|
|
|
/**
|
|
* 查询会议预约详情
|
|
* @param id id
|
|
* @returns 会议预约详情
|
|
*/
|
|
export function bookingInfo(id: ID) {
|
|
return requestClient.get<BookingVO>(`/property/booking/${id}`);
|
|
}
|
|
|
|
/**
|
|
* 新增会议预约
|
|
* @param data
|
|
* @returns void
|
|
*/
|
|
export function bookingAdd(data: BookingForm) {
|
|
return requestClient.postWithMsg<void>('/property/booking', data);
|
|
}
|
|
|
|
/**
|
|
* 更新会议预约
|
|
* @param data
|
|
* @returns void
|
|
*/
|
|
export function bookingUpdate(data: BookingForm) {
|
|
return requestClient.putWithMsg<void>('/property/booking', data);
|
|
}
|
|
|
|
/**
|
|
* 删除会议预约
|
|
* @param id id
|
|
* @returns void
|
|
*/
|
|
export function bookingRemove(id: ID | IDS) {
|
|
return requestClient.deleteWithMsg<void>(`/property/booking/${id}`);
|
|
}
|