Skip to content

Commit

Permalink
Merge pull request #225 from DartExplore/issue#224
Browse files Browse the repository at this point in the history
added lat and long to StationDTO
  • Loading branch information
ZaneBartlett1 authored Aug 11, 2023
2 parents 54fc38a + b2714dc commit d292517
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/main/java/com/dallasbymetro/backend/dto/StationDTO.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,16 @@
public class StationDTO {
private Long stationId;
private String name;
private Double latitude;
private Double longitude;
private Set<StationColor> color;
private List<PointOfInterestDTO> pointsOfInterest;

public StationDTO(Station station) {
this.stationId = station.getStationId();
this.name = station.getName();
this.latitude = station.getLatitude();
this.longitude = station.getLongitude();
this.color = station.getColor();
this.pointsOfInterest = station.getPointOfInterest().stream()
.map(PointOfInterestDTO::prepareDTO)
Expand All @@ -38,6 +42,22 @@ public void setName(String name) {
this.name = name;
}

public Double getLatitude() {
return latitude;
}

public void setLatitude(Double latitude) {
this.latitude = latitude;
}

public Double getLongitude() {
return longitude;
}

public void setLongitude(Double longitude) {
this.longitude = longitude;
}

public Set<StationColor> getColor() {
return color;
}
Expand Down

0 comments on commit d292517

Please sign in to comment.