import request from '@/utils/request'

// 查询家族列表
export function listFamily(query) {
  return request({
    url: '/system/family/list',
    method: 'get',
    params: query
  })
}
// 根据会员id查询家族列表
export function listFamilyByUid(query) {
  return request({
    url: '/system/family/listByUid',
    method: 'get',
    params: query
  })
}

// 查询家族详细
export function getFamily(id) {
  return request({
    url: '/system/family/' + id,
    method: 'get'
  })
}

// 新增家族
export function addFamily(data) {
  return request({
    url: '/system/family',
    method: 'post',
    data: data
  })
}

// 修改家族
export function updateFamily(data) {
  return request({
    url: '/system/family',
    method: 'put',
    data: data
  })
}

// 删除家族
export function delFamily(id) {
  return request({
    url: '/system/family/' + id,
    method: 'delete'
  })
}

// 导出家族
export function exportFamily(query) {
  return request({
    url: '/system/family/export',
    method: 'get',
    params: query
  })
}