import request from '@/utils/request'

// 查询记账账户列表
export function listAccounts(query) {
  return request({
    url: '/invest/accounts/list',
    method: 'get',
    params: query
  })
}

// 查询记账账户详细
export function getAccounts(id) {
  return request({
    url: '/invest/accounts/' + id,
    method: 'get'
  })
}

// 新增记账账户
export function addAccounts(data) {
  return request({
    url: '/invest/accounts',
    method: 'post',
    data
  })
}

// 修改记账账户
export function updateAccounts(data) {
  return request({
    url: '/invest/accounts',
    method: 'put',
    data
  })
}

// 删除记账账户
export function delAccounts(id) {
  return request({
    url: '/invest/accounts/' + id,
    method: 'delete'
  })
}
