import { get, post, put, del } from '../../http'

/**
 * @description: 获取协议列表
 * @param {*} params
 * @return {*}
 */
export const getAgreeList = async (params: Record<string, any>) => {
  return await get<any>('/agreement/list', params)
}

/**
 * @description: 新增协议
 * @param {string} id
 */
export const createAgreeList = async (data: Record<string, any>) => {
  return await post<any>('/agreement', data)
}

/**
 * @description: 保存协议
 * @param {string} id
 */
export const saveAgreeList = async (data: Record<string, any>) => {
  return await put('/agreement', data)
}

/**
 * @description: 删除协议
 * @param {Record} params
 * @param {*} any
 */
export const deleteAgreeList = async (id: string) => {
  return await del(`/agreement/${id}`)
}
