import request from '@/utils/request'

// 查询科目类别列表
export function listSubjectType(query) {
  return request({
    url: '/finance/subjectType/list',
    method: 'get',
    params: query
  })
}

// 查询科目类别详细
export function getSubjectType(subjectTypeId) {
  return request({
    url: '/finance/subjectType/' + subjectTypeId,
    method: 'get'
  })
}

// 新增科目类别
export function addSubjectType(data) {
  return request({
    url: '/finance/subjectType/add',
    method: 'post',
    data: data
  })
}

// 修改科目类别
export function updateSubjectType(data) {
  return request({
    url: '/finance/subjectType/update',
    method: 'put',
    data: data
  })
}

// 删除科目类别
export function delSubjectType(subjectTypeId) {
  return request({
    url: '/finance/subjectType/' + subjectTypeId,
    method: 'delete'
  })
}
