import '../utils/http/response_model.dart';
import '../utils/http/dio_request.dart';
import '../models/bo/device_topology_bo.dart';

class DeviceTopologyRepository {
  /// 获取设备拓扑
  Future<ResponseModel<DeviceTopologyBO>> getTopology({required String deviceId}) {
    return DioRequest.instance.get<DeviceTopologyBO>(
      '/app/device/topology',
      queryParameters: {'deviceId': deviceId},
      fromJsonT: (data) =>
          DeviceTopologyBO.fromJson(data as Map<String, dynamic>),
    );
  }
}