import request from '@/utils/request'

export function fetchList(query) {
  return request({
    url: '/quartz/page',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/quartz',
    method: 'post',
    data: obj
  })
}

export function getAll() {
  return request({
    url: '/quartz/all/',
    method: 'get'
  })
}


export function getJobName(name) {
  return request({
    url: '/quartz/jobName/'+name,
    method: 'get'
  })
}


export function getJobTime(name) {
  return request({
    url: '/quartz/jobTime/'+name,
    method: 'get'
  })
}

export function delObj(id) {
  return request({
    url: '/quartz/' + id,
    method: 'delete'
  })
}

export function putObj(obj) {
  return request({
    url: '/quartz',
    method: 'put',
    data: obj
  })

}
