Erweiterungen Ranking

This commit is contained in:
Sven committed 2024-02-26 15:40:22 +01:00
1 parent 972855789d
commit 9f89673751
5 files changed
+266 -509

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 Rank {
late Id id;
late String zip;
late String area;
late int time;
late List<Vehicle> vehicles;
Rank();
factory Rank.fromJson(Map<String, dynamic> json) => _$RankFromJson(json);
Map<String, dynamic> toJson() => _$RankToJson(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);
}