import { defHttp } from '/@/utils/http/axios';
import { setParams } from '/@/utils/index';

enum Api {
  bedScheduledMemoQueryPage = '/bed/scheduledMemo/query/page',
  bedScheduledMemoDetail = '/bed/scheduledMemo/detail',
  bedScheduledMemoAdd = '/bed/scheduledMemo/add',
  bedScheduledMemoEdit = '/bed/scheduledMemo/edit',
  bedScheduledMemoRemove = '/bed/scheduledMemo/removeByIds',
}

/**
 *
 * @author fan
 * @date  2023/07/17 16:06
 * @description: 根据条件查询排床备忘录列表,权限 - scheduled:scheduledMemo:query
 * @method: POST
 */

export const bedScheduledMemoQueryPage = (params?: object) => {
  return defHttp.post({ url: Api.bedScheduledMemoQueryPage, params: setParams(params) });
};
/**
 *
 * @author fan
 * @date  2023/07/17 16:06
 * @description: 根据id查询排床备忘录详细信息,权限 - scheduled:scheduledMemo:query
 * @method: GET
 * @param:  id 主键id
 */
export const bedScheduledMemoDetail = (id: string) => {
  return defHttp.get({ url: Api.bedScheduledMemoDetail + '/' + id });
};

/**
 *
 * @author fan
 * @date  2023/07/17 16:06
 * @description: 添加排床备忘录,权限 - scheduled:scheduledMemo:add
 * @method: POST
 */
export const bedScheduledMemoAdd = (params?: object) => {
  return defHttp.post({ url: Api.bedScheduledMemoAdd, params: params });
};

/**
 *
 * @author fan
 * @date  2023/07/17 16:06
 * @description: 通过主键id编辑排床备忘录,权限 - scheduled:scheduledMemo:edit
 * @method: POST
 */
export const bedScheduledMemoEdit = (params?: object) => {
  return defHttp.post({ url: Api.bedScheduledMemoEdit, params: params });
};

/**
 * @description: 删除,权限 - scheduled:scheduledMemo:remove
 * @method: POST
 */
export const bedScheduledMemoRemove = (params: Array<string | number>) => {
  return defHttp.post({ url: Api.bedScheduledMemoRemove, params: params });
};
