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

const prefix = 'platform-qualifications/';
/**
 * 分页查询资质列表
 * @param data
 */
export async function getPlatformQualificationsList(data: any) {
  return requestClient.get<any>(`${prefix}list`, { params: data });
}
/**
 * 获取资质下拉列表
 * @param data
 */
export async function getPlatformQualificationsOption(data: any) {
  return requestClient.get<any>(`${prefix}option`, { params: data });
}

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

/**
 * 新增资质
 * @param data
 */
export async function createPlatformQualifications(data: Record<string, any>) {
  return requestClient.post<any>(`${prefix}create`, data);
}

/**
 * 编辑资质
 * @param data
 */
export async function updatePlatformQualifications(data: Record<string, any>) {
  return requestClient.post<any>(`${prefix}update`, data);
}

/**
 * 删除资质
 * @param data
 */
export async function deletePlatformQualifications(data: Record<string, any>) {
  return requestClient.post<any>(`${prefix}delete`, data);
}
