mirror of
https://github.com/2martens/tsw-timetable.git
synced 2026-10-17 07:57:55 +02:00
Fix BahnStationMapper
This commit is contained in:
+9
-1
@@ -1,6 +1,7 @@
|
|||||||
package de.twomartens.timetable.bahnApi.mapper
|
package de.twomartens.timetable.bahnApi.mapper
|
||||||
|
|
||||||
import de.twomartens.timetable.bahnApi.model.db.BahnStation
|
import de.twomartens.timetable.bahnApi.model.db.BahnStation
|
||||||
|
import de.twomartens.timetable.types.NonEmptyString
|
||||||
import org.mapstruct.*
|
import org.mapstruct.*
|
||||||
|
|
||||||
@Mapper(
|
@Mapper(
|
||||||
@@ -13,5 +14,12 @@ interface BahnStationMapper {
|
|||||||
@Mapping(target = "id", ignore = true)
|
@Mapping(target = "id", ignore = true)
|
||||||
@Mapping(target = "created", ignore = true)
|
@Mapping(target = "created", ignore = true)
|
||||||
@Mapping(target = "lastModified", 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
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user