import request from '@/utils/request';

// 查询定时任务调度列表
export function listVersion(query) {
  return request({
    url: '/version/list',
    method: 'get',
    params: query
  });
}

//查询最近新增20条 用于现在系统首页
export function latestVersion(query) {
  return request({
    url: '/version/latest',
    method: 'get',
    params: query
  });
}

// 查询定时任务调度详细
export function getVersion(id) {
  return request({
    url: '/version/' + id,
    method: 'get'
  });
}

// 新增定时任务调度
export function addVersion(data) {
  return request({
    url: '/version/add',
    method: 'post',
    data: data
  });
}

// 修改定时任务调度
export function updateVersion(data) {
  return request({
    url: '/version',
    method: 'put',
    data: data
  });
}

// 删除定时任务调度
export function delVersion(id) {
  return request({
    url: '/version/' + id,
    method: 'delete'
  });
} 
