import { defHttp } from '/@/utils/http/axios';
enum Api {
  workingDayGet = '/biz/sys/workday/query/detail',
  workingDayEdit = '/biz/sys/workday/edit',
  SailingsGet = '/biz/sys/sailings/query/list',
  SailingsEdit = '/biz/sys/sailings/edit',
}

export const getWorkingDay = (params?: object) => {
  return defHttp.post({ url: Api.workingDayGet, params: params });
};

export const WorkingDayEdit = (params?: object) => {
  return defHttp.post({ url: Api.workingDayEdit, params: params });
};

export const getSailings = async (params?: object) => {
  return await defHttp.post({ url: Api.SailingsGet, params: params }).then(res => {
    return res.infos;
  });
};

export const sailingsEdit = (params?: object) => {
  return defHttp.post({ url: Api.SailingsEdit, params: params });
};
