import request from '@/utils/request';

/**
 * 详情
 * @param {*} data
 * @returns
 */
 export const getGuaranteeTask = (id) => request(`/guaranteeTask/${id}`);

/**
 * 新增
 * @param {*} data
 * @returns
 */
 export const addGuaranteeTask = (data) => request('/guaranteeTask', { method: 'post', data });

 
/**
 * 更新
 * @param {*} data
 * @returns
 */
 export const updateGuaranteeTask = (data, id) => request(`/guaranteeTask/${id}`, { method: 'put', data });

 /**
  * 查询明细
  * @param {*} data
  * @returns
  */
  export const getGuaranteeDetailList = (params) => request('/guaranteeDetail', { params });

/**
 * 批量新增明细
 * @param {*} data
 * @returns
 */
 export const addGuaranteeDetailBatch = (data, guaranteeId) => request('/guaranteeDetail/batch', { method: 'post', data, params: { guaranteeId } });
 
/**
 * 删除明细
 * @param {*} data
 * @returns
 */
 export const deleteGuaranteeDetail = id => request(`/guaranteeDetail/${id}`, { method: 'delete' });



 /**
 * 查询列表
 * @param {*} params
 * @returns
 */
export const getGuaranteeTaskList = (params) => request('/guaranteeTask', { params });

/**
 * 删除
 * @param {*} data
 * @returns
 */
 export const deleteGuaranteeTask = id => request(`/guaranteeTask/${id}`, { method: 'delete' });
