import 'wayz_common_models.dart';

/// 融合定位
class WzTrackPointsResponse {
  final String id;
  final String asset;
  final WzLocation location;

  WzTrackPointsResponse({
    required this.id,
    required this.asset,
    required this.location,
  });

  factory WzTrackPointsResponse.fromJson(Map<String, dynamic> json) {
    return WzTrackPointsResponse(
      id: (json['id'] ?? '') as String,
      asset: (json['asset'] ?? '') as String,
      location: WzLocation.fromJson((json['location'] as Map).cast<String, dynamic>()),
    );
  }

  Map<String, dynamic> toJson() => {
        'id': id,
        'asset': asset,
        'location': location.toJson(),
      };
}

