import { request } from '@/utils/request'

export function getPet(id) {
  return request({
    url: '/archieves/pet/' + id,
    method: 'get'
  })
}

export function listPet(query) {
  return request({
    url: '/archieves/pet/list',
    method: 'get',
    params: query
  })
}

export function delPet(id) {
  return request({
    url: '/archieves/pet/' + id,
    method: 'delete'
  })
}

export function addPet(data) {
  return request({
    url: '/archieves/pet',
    method: 'post',
    data: data
  })
}

export function updatePet(data) {
  return request({
    url: '/archieves/pet',
    method: 'put',
    data: data
  })
}
/**
 * 按用户查询宠物列表
 * @Author: Antigravity
 */
export function listPetByUser(userId) {
  return request({
    url: '/archieves/pet/listByUser/' + userId,
    method: 'get'
  })
}
