feat(wip): Update entities and adopt a proper repository workflow for trip "obtention"

This commit is contained in:
2025-12-29 00:23:10 +01:00
parent 239b63ca81
commit 81ed2fd8c3
34 changed files with 1929 additions and 1925 deletions

View File

@@ -5,7 +5,20 @@ part 'preferences.g.dart';
@freezed
abstract class Preferences with _$Preferences {
const factory Preferences({
required String test,
/// Scores keyed by preference type (e.g. 'sightseeing', 'shopping', 'nature')
required Map<String, int> scores,
/// Maximum trip duration in minutes
required int maxTimeMinutes,
/// Required start location [lat, lon]
required List<double> startLocation,
/// Optional end location
List<double>? endLocation,
/// Optional detour tolerance in minutes
int? detourToleranceMinutes,
}) = _Preferences;
factory Preferences.fromJson(Map<String, Object?> json) => _$PreferencesFromJson(json);