import axiosInstance from '../../utils/axios';

// 设备/工艺 VO 类型
export interface TechnologyVO {
  id?: number;
  machineryName: string;
  machineryType?: string;
  parentId?: number;
  children?: TechnologyVO[];
  [key: string]: any;
}

// 分页参数类型
export interface PageParam {
  pageNo?: number;
  pageSize?: number;
  [key: string]: any;
}

// 分页响应类型
export interface PageResponse<T> {
  list: T[];
  total: number;
}

// 设备/工艺管理 API
export const technologyApi = {
  // 查询设备/工艺列表
  listTechnology: (params?: PageParam): Promise<PageResponse<TechnologyVO>> => {
    return axiosInstance.get('/iscs/technology/list', { params });
  },
};

