Umbau MQTT

This commit is contained in:
Sven committed 2024-04-08 10:22:12 +02:00
1 parent a683ea0ff1
commit 31a292e8d0
6 files changed
+1160 -21

No files matched your search

+41
View File
@@ -0,0 +1,41 @@
import 'package:isar/isar.dart';
import 'package:json_annotation/json_annotation.dart';
part 'rank.g.dart';
@collection
@JsonSerializable()
class Ranking {
late Id id;
late String zip;
late String area;
late int time;
late List<Vehicle> vehicles;
Ranking();
factory Ranking.fromJson(Map<String, dynamic> json) => _$RankingFromJson(json);
Map<String, dynamic> toJson() => _$RankingToJson(this);
}
@embedded
@JsonSerializable()
class Vehicle {
late int id;
late int type;
@JsonKey(name: 'self', defaultValue: false)
late bool? self;
Vehicle();
factory Vehicle.fromJson(Map<String, dynamic> json) => _$VehicleFromJson(json);
Map<String, dynamic> toJson() => _$VehicleToJson(this);
}