Fix BahnStationMapper
This commit is contained in:
parent
f7de1c2825
commit
26bb3e0654
|
@ -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
|
||||
)
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue