import { DicChkplatModel } from '@/types'
import request from '@/until/request'

/**
 * 获取工装列表
 * @param page number
 * @param rows number
 */
const QueryDicChkplatList = (page: number, rows: number) =>
    request({
        url: '/DicChkplatAction/list/' + page + '/' + rows,
        method: 'get'
    })

/**
* 新增工装
* @param data DicChkplatModel
*/
const AddDicChkplat= (data: DicChkplatModel) =>
    request({
        url: '/DicChkplatAction/saveDicChkplat',
        method: 'post',
        data: data
    })

/**
* 编辑工装
* @param data DicChkplatModel
*/
const EditDicChkplat = (data: DicChkplatModel) =>
    request({
        url: '/DicChkplatAction/updateDicChkplat',
        method: 'post',
        data: data
    })

/**
* 删除工装
* @param  id number
*/
const DeleteDicChkplat = (id: number) =>
    request({
        url: '/DicChkplatAction/deleteDicChkplat/' + id,
        method: 'get',
    })

export default {
    QueryDicChkplatList,
    AddDicChkplat,
    EditDicChkplat,
    DeleteDicChkplat
}