import http from "@/http/http";
import { CurrencyQueryParam,SubmitCurrencyModel,CurrencyList } from "./CurrencyModle";

enum Api{
    getCurrencyList = '/api/currency/list',
    add = '/api/currency',
    edit = '/api/currency',
    delete = '/api/currency'
}

//查询币种列表
export const getCurrencyListApi = async(parms:CurrencyQueryParam) =>{
    return  await http.get(Api.getCurrencyList,parms)
}

//新增
export const addCurrencyApi = async (parms:SubmitCurrencyModel) =>{   
    return await http.post(Api.add,parms)
}
//编辑
export const editCurrencyApi = async (parms:SubmitCurrencyModel) =>{   
    return await http.put(Api.edit,parms)
}
//删除
export const deleteCurrencyApi = async (parms:any) =>{
    return await http.delete(Api.delete,parms)
}