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

@@ -1,3 +1,4 @@
// TODO - I have the feeling this file is outdated and not used anymore
import 'package:anyway/domain/entities/landmark.dart';
import 'package:anyway/domain/entities/landmark_description.dart';
import 'package:anyway/domain/entities/landmark_type.dart';
@@ -16,6 +17,8 @@ abstract class LandmarkModel with _$LandmarkModel {
required String description,
}) = _LandmarkModel;
const LandmarkModel._();
factory LandmarkModel.fromJson(Map<String, dynamic> json) => _$LandmarkModelFromJson(json);
Landmark toEntity() => Landmark(
@@ -24,7 +27,6 @@ abstract class LandmarkModel with _$LandmarkModel {
location: location,
type: LandmarkType(type: LandmarkTypeEnum.values.firstWhere((e) => e.value == type)),
isSecondary: isSecondary,
// TODO - try to set tags
description: LandmarkDescription(description: description, tags: [])
description: LandmarkDescription(description: description, tags: []),
);
}