import 'package:json_annotation/json_annotation.dart';

part 'atmob_track_point.g.dart';

@JsonSerializable()
class AtmobTrackPoint {
  @JsonKey(name: "lng")
  double longitude;

  @JsonKey(name: "lat")
  double latitude;

  @JsonKey(name: "ts")
  int time;

  @JsonKey(name: "speed")
  double? speed;

  @JsonKey(name: "bearing")
  double? bearing;

  @JsonKey(name: "addr")
  String? addr;

  @JsonKey(name: "photo")
  String? photo;

  @JsonKey(name: "id")
  int? id;

  int? traceType;

  AtmobTrackPoint(
      {required this.longitude,
      required this.latitude,
      required this.time,
      this.speed,
      this.bearing,
      this.addr,
      this.photo,
      this.id});

  Map<String, dynamic> toJson() => _$AtmobTrackPointToJson(this);

  factory AtmobTrackPoint.fromJson(Map<String, dynamic> json) =>
      _$AtmobTrackPointFromJson(json);
}
