add trip validation and invalidation functionality in TripService and TripController
LocationBasedServices/sumoc-backend/pipeline/head This commit looks good
LocationBasedServices/sumoc-backend/pipeline/head This commit looks good
This commit is contained in:
@@ -40,6 +40,9 @@ public class Trip {
|
||||
@Column(nullable = true)
|
||||
private float cost;
|
||||
|
||||
@Column(nullable = false)
|
||||
private boolean invalidated = false;
|
||||
|
||||
@OneToMany(mappedBy = "trip", cascade = CascadeType.ALL, orphanRemoval = true)
|
||||
private Set<TripSegment> tripSegments = new HashSet<>();
|
||||
|
||||
@@ -130,4 +133,12 @@ public class Trip {
|
||||
public void setTripSegments(Set<TripSegment> segments) {
|
||||
this.tripSegments = segments;
|
||||
}
|
||||
|
||||
public boolean isInvalidated() {
|
||||
return invalidated;
|
||||
}
|
||||
|
||||
public void setInvalidated(boolean invalidated) {
|
||||
this.invalidated = invalidated;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user