import { DicConfigAuthModel, DicConfigAuthQueryParam } from '@/types'
import request from '@/until/request'

/**
 * 获取DicConfigAuth列表
 * @param data DicConfigAuthQueryParam
 */
const QueryDicConfigAuthList = (data: DicConfigAuthQueryParam) =>
request({
    url: '/DicConfigAuthAction/list',
    method: 'post',
    data: data
})

/**
* 新增DicConfigAuth
* @param data DicConfigAuthModel
*/
const AddDicConfigAuth = (data: DicConfigAuthModel) =>
    request({
        url: '/DicConfigAuthAction/saveDicConfigAuth',
        method: 'post',
        data: data
    })

/**
* 编辑DicConfigAuth
* @param data DicConfigAuthModel
*/
const EditDicConfigAuth = (data: DicConfigAuthModel) =>
    request({
        url: '/DicConfigAuthAction/updateDicConfigAuth',
        method: 'post',
        data: data
    })

/**
* 删除DicConfigAuth
* @param  id number
*/
const DeleteDicConfigAuth = (id: number) =>
    request({
        url: '/DicConfigAuthAction/deleteDicConfigAuth/' + id,
        method: 'get',
    })

export default {
    QueryDicConfigAuthList,
    AddDicConfigAuth,
    EditDicConfigAuth,
    DeleteDicConfigAuth,
}