import {request} from '@/utils/request.js'

/**
 * 获取Task Event分页
 * @param data
 * @returns
 */
export function getTaskEventByPage(data) {
  return request({
    url: '/task/event/page',
    method: 'GET',
    params: data
  })
}

/**
 * 获取Task Event列表
 * @param data
 * @returns
 */
export function getTaskEventByList(data) {
  return request({
    url: '/task/event',
    method: 'GET',
    params: data
  })
}

/**
 * 根据Id获取Task Event
 * @param data
 * @returns
 */
export function getTaskEventByTaskId(taskId) {
  return request({
    url: `/task/event/${taskId}`,
    method: 'GET'
  })
}

/**
 * 添加Task Event
 * @param data
 * @returns
 */
export function createTaskEvent(data) {
  return request({
    url: `/task/event/add`,
    method: 'POST',
    data
  })
}

/**
 * 删除Task Event
 * @param data
 * @returns
 */
export function deleteTaskEvent(taskId) {
  return request({
    url: `/task/event/${taskId}`,
    method: 'DELETE'
  })
}

