From 26bb3e065449651492523a7dccc083349dd97aa4 Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Thu, 26 Oct 2023 21:00:57 +0200 Subject: [PATCH] Fix BahnStationMapper --- .../timetable/bahnApi/mapper/BahnStationMapper.kt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/module-server/src/main/kotlin/de/twomartens/timetable/bahnApi/mapper/BahnStationMapper.kt b/module-server/src/main/kotlin/de/twomartens/timetable/bahnApi/mapper/BahnStationMapper.kt index d3028c7..9674973 100644 --- a/module-server/src/main/kotlin/de/twomartens/timetable/bahnApi/mapper/BahnStationMapper.kt +++ b/module-server/src/main/kotlin/de/twomartens/timetable/bahnApi/mapper/BahnStationMapper.kt @@ -1,6 +1,7 @@ package de.twomartens.timetable.bahnApi.mapper import de.twomartens.timetable.bahnApi.model.db.BahnStation +import de.twomartens.timetable.types.NonEmptyString import org.mapstruct.* @Mapper( @@ -13,5 +14,12 @@ interface BahnStationMapper { @Mapping(target = "id", ignore = true) @Mapping(target = "created", ignore = true) @Mapping(target = "lastModified", ignore = true) - fun mapToDB(dto: de.twomartens.timetable.bahnApi.model.dto.BahnStation): BahnStation + fun mapToDB(dto: de.twomartens.timetable.bahnApi.model.dto.BahnStation): BahnStation { + return BahnStation( + dto.eva, + NonEmptyString(dto.name), + dto.ds100, + dto.db + ) + } } \ No newline at end of file