import { TaskBatchRemoteModel, TaskBatchRemoteQueryParam } from '@/types'
import request from '@/until/request'

/**
 * 获取TaskBatchRemote列表
 * @param data TaskBatchRemoteQueryParam
 */
const QueryTaskBatchRemoteList = (data: TaskBatchRemoteQueryParam) =>
request({
    url: '/TaskBatchRemoteAction/list',
    method: 'post',
    data: data
})

/**
* 新增TaskBatchRemote
* @param data TaskBatchRemoteModel
*/
const AddTaskBatchRemote = (data: TaskBatchRemoteModel) =>
    request({
        url: '/TaskBatchRemoteAction/saveTaskBatchRemote',
        method: 'post',
        data: data
    })

/**
* 编辑TaskBatchRemote
* @param data TaskBatchRemoteModel
*/
const EditTaskBatchRemote = (data: TaskBatchRemoteModel) =>
    request({
        url: '/TaskBatchRemoteAction/updateTaskBatchRemote',
        method: 'post',
        data: data
    })

/**
* 删除TaskBatchRemote
* @param  id number
*/
const DeleteTaskBatchRemote = (id: number) =>
    request({
        url: '/TaskBatchRemoteAction/deleteTaskBatchRemote/' + id,
        method: 'get',
    })

/**
* 根据taskBatchId获取对象
* @param  taskBatchId string
*/
const QueryTaskBatchRemoteByTaskBatchId = (taskBatchId: string) =>
    request({
        url: '/TaskBatchRemoteAction/findTaskBatchRemoteByTaskBatchId/' + taskBatchId,
        method: 'get',
    })

export default {
    QueryTaskBatchRemoteList,
    AddTaskBatchRemote,
    EditTaskBatchRemote,
    DeleteTaskBatchRemote,
    QueryTaskBatchRemoteByTaskBatchId
}