import { requestClient } from '#/api/request';

const prefix = 'service-pack/';
/**
 * 分页查询用户列表
 * @param data
 */
export async function getServicePackList(data: any) {
  return requestClient.get<any>(`${prefix}list`, { params: data });
}
/**
 * 分页查询用户列表
 * @param data
 */
export async function getServicePackOption(data: any) {
  return requestClient.get<any>(`${prefix}option`, { params: data });
}

/**
 * 获取产品服务包详情
 * @param id
 */
export async function getServicePackInfo(id: number) {
  return requestClient.get<any>(`${prefix}detail`, { params: { id } });
}

/**
 * 新增产品服务包
 * @param data
 */
export async function createServicePack(data: Record<string, any>) {
  return requestClient.post<any>(`${prefix}create`, data);
}

/**
 * 编辑产品服务包
 * @param data
 */
export async function updateServicePack(data: Record<string, any>) {
  return requestClient.post<any>(`${prefix}update`, data);
}

/**
 * 删除产品服务包
 * @param data
 */
export async function deleteServicePack(data: Record<string, any>) {
  return requestClient.post<any>(`${prefix}delete`, data);
}

/**
 * 更新服务包分区分类
 * @param data
 */
export async function updateZoneCategory(data: Record<string, any>) {
  return requestClient.post<any>(`${prefix}update-zone-category`, data);
}
