add basic trip upload and retrieval functionality
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package SuMoC.backend.trip;
|
||||
|
||||
import SuMoC.backend.models.TripSegment;
|
||||
import SuMoC.backend.trip.dtos.NewTripSegmentDTO;
|
||||
import SuMoC.backend.trip.dtos.TripSegmentDTO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
@@ -9,8 +10,11 @@ import java.util.List;
|
||||
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface TripSegmentMapper {
|
||||
@Mapping(source = "id", target = "tripSegmentId")
|
||||
@Mapping(source = "trip.id", target = "tripId")
|
||||
TripSegmentDTO toTripSegmentDTO(TripSegment tripSegment);
|
||||
|
||||
List<TripSegmentDTO> toTripSegmentDTOs(List<TripSegment> tripSegments);
|
||||
|
||||
TripSegment toTripSegment(NewTripSegmentDTO newTripSegmentDTO);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user