import { TSetupModel, TSetupQueryParam } from '@/types'
import request from '@/until/request'

/**
 * 获取安装记录列表
 * @param data TSetupQueryParam
 */
const QueryTSetupList = (data: TSetupQueryParam) =>
    request({
        url: '/TSetupAction/list',
        method: 'post',
        data: data
    })

/**
* 新增安装记录
* @param data TSetupModel
*/
const AddTSetup = (data: TSetupModel) =>
    request({
        url: '/TSetupAction/saveTSetup',
        method: 'post',
        data: data
    })

/**
* 编辑安装记录
* @param data TSetupModel
*/
const EditTSetup = (data: TSetupModel) =>
    request({
        url: '/TSetupAction/updateTSetup',
        method: 'post',
        data: data
    })

/**
* 删除安装记录
* @param  id number
*/
const DeleteTSetup = (id: number,setupId:string) =>
    request({
        url: '/TSetupAction/deleteTSetup/' + id+'/'+setupId,
        method: 'get',
    })

export default {
    QueryTSetupList,
    AddTSetup,
    EditTSetup,
    DeleteTSetup
}