trips: add controller, service, mappers, dtos etc.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package SuMoC.backend.trip;
|
||||
|
||||
import SuMoC.backend.trip.dtos.TripDTO;
|
||||
import SuMoC.backend.trip.models.Trip;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper(componentModel = "spring", uses = TripSegmentMapper.class)
|
||||
public interface TripMapper {
|
||||
@Mapping(source = "user.id", target = "userId")
|
||||
TripDTO toTripDTO(Trip trip);
|
||||
|
||||
List<TripDTO> toTripDTOs(List<Trip> trips);
|
||||
}
|
||||
Reference in New Issue
Block a user