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 int deviceId}) {
    return DioRequest.instance.post<DeviceTopologyBO>(
      '/app/device/topology',
      data: {'deviceId': deviceId},
      fromJsonT: (data) =>
          DeviceTopologyBO.fromJson(data as Map<String, dynamic>),
    );
  }
}