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

/**
 * 分页查询用户列表
 * @param data
 */
export async function getPlatformList(data: any) {
  return requestClient.get<any>('platform/list', { params: data });
}

/**
 * 获取平台详情
 * @param id
 */
export async function getPlatformInfo(id: number) {
  return requestClient.get<any>('platform/detail', { params: { id } });
}

/**
 * 新增平台
 * @param data
 */
export async function createPlatform(data: Record<string, any>) {
  return requestClient.post<any>('platform/create', data);
}

/**
 * 编辑平台
 * @param data
 */
export async function updatePlatform(data: Record<string, any>) {
  return requestClient.post<any>('platform/update', data);
}

/**
 * 删除平台
 * @param data
 */
export async function deletePlatform(data: Record<string, any>) {
  return requestClient.post<any>('platform/delete', data);
}
