
import http from '@/http/http'
import { Idparams, ResultInterface } from '../base/BaseDataModel';
import { ApprovalUserAddParams, ApprovalUserDto, ApprovalUserParam } from "./approvalUserModel";

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

/**
 * 审批人员列表
 * @param parms 
 * @returns 
 */
export const api_approvalUserList = async (parms: ApprovalUserParam) => {
    return await http.get<ResultInterface<ApprovalUserDto>>(Api.list, parms)
}

/**
 * 审批人员新增
 * @param parms 
 * @returns 
 */
export const api_approvalUserAdd = async (parms: ApprovalUserAddParams) => {
    return await http.post(Api.add, parms)
}
/**
 * 审批人员编辑
 * @param parms 
 * @returns 
 */
export const api_approvalUserEdit = async (parms: ApprovalUserAddParams) => {
    return await http.put(Api.edit, parms)
}
/**
 * 审批人员删除
 * @param parms 
 * @returns 
 */
export const api_approvalUserDelete = async (parms: Idparams) => {
    return await http.delete(Api.delete, parms)
}