import http from "@/http/http";
import {CurrencyRateQueryParam,SubmitCurrencyRateModel} from "@/api/costdata/currencyrate/CurrencyRateModle";
enum Api{
    getCurrencyRateList = '/api/rate/list',   
    add = '/api/rate',
    edit = '/api/rate',
    delete = '/api/rate'
}

//查询列表
export const getCurrencyRateListApi = async(parms:CurrencyRateQueryParam) =>{
    return  await http.get(Api.getCurrencyRateList,parms)
}

//新增
export const addCurrencyRateApi = async (parms:SubmitCurrencyRateModel) =>{   
    return await http.post(Api.add,parms)
}
//编辑
export const editCurrencyRateApi = async (parms:SubmitCurrencyRateModel) =>{   
    return await http.put(Api.edit,parms)
}
//删除
export const deleteCurrencyRateApi = async (parms:any) =>{
    return await http.delete(Api.delete,parms)
}