Erweiterungen

This commit is contained in:
Sven committed 2024-02-14 11:21:22 +01:00
1 parent 31fe4c5a06
commit 98581c9a39
13 files changed
+2792 -996

No files matched your search

+56
View File
@@ -0,0 +1,56 @@
import 'package:isar/isar.dart';
import 'package:json_annotation/json_annotation.dart';
part 'ranking.g.dart';
@collection
@JsonSerializable()
class Ranking {
@JsonKey(name: 'id', defaultValue: 0)
late Id id = 0;
late List<Rank> ranks;
Ranking();
factory Ranking.fromJson(Map<String, dynamic> json) => _$RankingFromJson(json);
Map<String, dynamic> toJson() => _$RankingToJson(this);
}
@embedded
@JsonSerializable()
class Rank {
late int id;
late String zip;
late String area;
late String 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);
}
File diff suppressed because it is too large. Load diff