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

const prefix = 'user-collect/';
/**
 * 分页查询用户收藏列表
 * @param data
 */
export async function getUserCollectListApi(data: any) {
  return requestClient.get<any>(`${prefix}list`, { params: data });
}

/**
 * 获取用户收藏下拉列表
 */
export async function getUserCollectOptionApi() {
  return requestClient.get<any>(`${prefix}option`);
}

/**
 * 获取用户收藏详情
 * @param id
 */
export async function getUserCollectInfoApi(id: number) {
  return requestClient.get<any>(`${prefix}detail`, { params: { id } });
}

/**
 * 新增用户收藏
 * @param data
 */
export async function createUserCollectApi(data: Record<string, any>) {
  return requestClient.post<any>(`${prefix}create`, data);
}

/**
 * 编辑用户收藏
 * @param data
 */
export async function updateUserCollectApi(data: Record<string, any>) {
  return requestClient.post<any>(`${prefix}update`, data);
}

/**
 * 删除用户收藏
 * @param data
 */
export async function deleteUserCollectApi(data: Record<string, any>) {
  return requestClient.post<any>(`${prefix}delete`, data);
}
