import request from '@/utils/request'
export function getAllDataTypes() {
    return request({
      url: '/dataTypes',
      method: 'get'
    })
  }
  export function getDataTypeDTOs(data) {
    return request({
      url: '/cranes/'+data.id+'/dataTypeDTOs',
      method: 'get'
    })
  }

  export function addDataType(data) {
    return request({
      url: '/dataTypes',
      method: 'post',
      data
    })
  }
  export function deleteDataType(data) {
    return request({
      url: `/dataTypes/${data.id}`,
      method: 'delete'
    })
  }