80 lines
2.1 KiB
Java
80 lines
2.1 KiB
Java
package SuMoC.backend.trip.dtos;
|
|
|
|
import io.swagger.v3.oas.annotations.media.Schema;
|
|
|
|
import java.time.LocalDateTime;
|
|
import java.util.Set;
|
|
|
|
/**
|
|
* DTO representing a trip submitted from the App which is not yet persisted in the database.
|
|
* TODO assumption is that cost of trip is calculated server-side
|
|
*/
|
|
@Schema(description = "DTO for creating a new Trip")
|
|
public class NewTripDTO {
|
|
private String startPlace; // High level description of the trip's starting location
|
|
private String endPlace; // High level description of the trip's ending location
|
|
private LocalDateTime startTime;
|
|
private LocalDateTime endTime;
|
|
private float mobilityScore;
|
|
private Set<NewTripSegmentDTO> tripSegments;
|
|
|
|
public NewTripDTO() {}
|
|
|
|
public NewTripDTO (String startPlace, String endPlace, LocalDateTime startTime, LocalDateTime endTime, float mobilityScore, Set<NewTripSegmentDTO> tripSegments) {
|
|
this.startPlace = startPlace;
|
|
this.endPlace = endPlace;
|
|
this.startTime = startTime;
|
|
this.endTime = endTime;
|
|
this.mobilityScore = mobilityScore;
|
|
this.tripSegments = tripSegments;
|
|
}
|
|
|
|
public String getStartPlace() {
|
|
return startPlace;
|
|
}
|
|
|
|
public void setStartPlace(String startPlace) {
|
|
this.startPlace = startPlace;
|
|
}
|
|
|
|
public String getEndPlace() {
|
|
return endPlace;
|
|
}
|
|
|
|
public void setEndPlace(String endPlace) {
|
|
this.endPlace = endPlace;
|
|
}
|
|
|
|
public LocalDateTime getStartTime() {
|
|
return startTime;
|
|
}
|
|
|
|
public void setStartTime(LocalDateTime startTime) {
|
|
this.startTime = startTime;
|
|
}
|
|
|
|
public LocalDateTime getEndTime() {
|
|
return endTime;
|
|
}
|
|
|
|
public void setEndTime(LocalDateTime endTime) {
|
|
this.endTime = endTime;
|
|
}
|
|
|
|
public float getMobilityScore() {
|
|
return mobilityScore;
|
|
}
|
|
|
|
public void setMobilityScore(float mobilityScore) {
|
|
this.mobilityScore = mobilityScore;
|
|
}
|
|
|
|
public Set<NewTripSegmentDTO> getTripSegments() {
|
|
return tripSegments;
|
|
}
|
|
|
|
public void setTripSegments(Set<NewTripSegmentDTO> tripSegments) {
|
|
this.tripSegments = tripSegments;
|
|
}
|
|
}
|