import http from '@/http/http'
import { CountryQueryParam,SubmitCountryModel,CountryList } from "./CountryModle";

enum Api{
    getCountryList = '/api/country/list',
    add = '/api/country',
    edit = '/api/country',
    delete = '/api/country'
}

//查询国家/地区列表
export const getCountryListApi = async(parms:CountryQueryParam) =>{
    return  await http.get(Api.getCountryList,parms)
}

//新增
export const addCountryApi = async (parms:SubmitCountryModel) =>{   
    return await http.post(Api.add,parms)
}
//编辑
export const editCountryApi = async (parms:SubmitCountryModel) =>{   
    return await http.put(Api.edit,parms)
}
//删除
export const deleteCountryApi = async (parms:any) =>{
    return await http.delete(Api.delete,parms)
}