35 lines
720 B
Dart
35 lines
720 B
Dart
import 'package:isar/isar.dart';
|
|
import 'package:json_annotation/json_annotation.dart';
|
|
import 'package:stadtbote/tools/util.dart';
|
|
|
|
part 'track_station_message.g.dart';
|
|
|
|
@JsonSerializable()
|
|
class TrackStationMessage {
|
|
@JsonKey(name: 's_id')
|
|
late int sid;
|
|
|
|
late String time;
|
|
|
|
late Pos? pos;
|
|
|
|
TrackStationMessage();
|
|
|
|
factory TrackStationMessage.fromJson(Map<String, dynamic> json) => _$TrackStationMessageFromJson(json);
|
|
|
|
Map<String, dynamic> toJson() => _$TrackStationMessageToJson(this);
|
|
}
|
|
|
|
@JsonSerializable()
|
|
class Pos {
|
|
late double lat;
|
|
|
|
late double long;
|
|
|
|
Pos();
|
|
|
|
factory Pos.fromJson(Map<String, dynamic> json) => _$PosFromJson(json);
|
|
|
|
Map<String, dynamic> toJson() => _$PosToJson(this);
|
|
}
|