|
| 1 | +package com.back.web7_9_codecrete_be.domain.plans.dto; |
| 2 | + |
| 3 | +import com.fasterxml.jackson.annotation.JsonInclude; |
| 4 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | +import lombok.AllArgsConstructor; |
| 6 | +import lombok.Builder; |
| 7 | +import lombok.Getter; |
| 8 | +import lombok.NoArgsConstructor; |
| 9 | + |
| 10 | +import java.util.List; |
| 11 | + |
| 12 | +/** |
| 13 | + * 교통 경로 정보 DTO |
| 14 | + * 프론트엔드에서 제공하는 교통 경로 상세 정보를 담는 클래스 |
| 15 | + */ |
| 16 | +@Getter |
| 17 | +@Builder |
| 18 | +@NoArgsConstructor |
| 19 | +@AllArgsConstructor |
| 20 | +@JsonInclude(JsonInclude.Include.NON_NULL) |
| 21 | +@Schema(description = "교통 경로 정보") |
| 22 | +public class TransportRoute { |
| 23 | + |
| 24 | + @Schema(description = "총 소요 시간 (초)", example = "3600") |
| 25 | + private Integer totalTime; |
| 26 | + |
| 27 | + @Schema(description = "총 거리 (m)", example = "5000") |
| 28 | + private Integer totalDistance; |
| 29 | + |
| 30 | + @Schema(description = "총 도보 시간 (초) - 선택적", example = "600") |
| 31 | + private Integer totalWalkTime; |
| 32 | + |
| 33 | + @Schema(description = "총 도보 거리 (m) - 선택적", example = "500") |
| 34 | + private Integer totalWalkDistance; |
| 35 | + |
| 36 | + @Schema(description = "환승 횟수 - 선택적", example = "2") |
| 37 | + private Integer transferCount; |
| 38 | + |
| 39 | + @Schema(description = "도보, 대중교통 구간 배열") |
| 40 | + private List<Leg> leg; |
| 41 | + |
| 42 | + @Schema(description = "요금 정보") |
| 43 | + private Fare fare; |
| 44 | + |
| 45 | + @Getter |
| 46 | + @Builder |
| 47 | + @NoArgsConstructor |
| 48 | + @AllArgsConstructor |
| 49 | + @JsonInclude(JsonInclude.Include.NON_NULL) |
| 50 | + @Schema(description = "이동 구간 정보") |
| 51 | + public static class Leg { |
| 52 | + @Schema(description = "이동 수단", example = "SUBWAY", allowableValues = {"WALK", "BUS", "SUBWAY", "EXPRESSBUS", "TRAIN", "AIRPLANE", "FERRY"}) |
| 53 | + private String mode; |
| 54 | + |
| 55 | + @Schema(description = "구간 시작점") |
| 56 | + private Location start; |
| 57 | + |
| 58 | + @Schema(description = "구간 도착점") |
| 59 | + private Location end; |
| 60 | + |
| 61 | + @Schema(description = "구간 소요 시간 (초)", example = "1800") |
| 62 | + private Integer sectionTime; |
| 63 | + |
| 64 | + @Schema(description = "노선명 (예: \"간선:472\", \"지하철 2호선\") - 선택적", example = "지하철 2호선") |
| 65 | + private String route; |
| 66 | + |
| 67 | + @Schema(description = "노선 색상 (Hex 코드) - 선택적", example = "#00A84D") |
| 68 | + private String routeColor; |
| 69 | + |
| 70 | + @Schema(description = "노선 타입 - 선택적", example = "1") |
| 71 | + private Integer type; |
| 72 | + |
| 73 | + @Schema(description = "경유 정류장/역 개수 - 선택적", example = "5") |
| 74 | + private Integer passStopCount; |
| 75 | + |
| 76 | + @Schema(description = "경로 선형 (지도 그리기용) - 선택적") |
| 77 | + private PassShape passShape; |
| 78 | + } |
| 79 | + |
| 80 | + @Getter |
| 81 | + @Builder |
| 82 | + @NoArgsConstructor |
| 83 | + @AllArgsConstructor |
| 84 | + @JsonInclude(JsonInclude.Include.NON_NULL) |
| 85 | + @Schema(description = "위치 정보 (위도/경도)") |
| 86 | + public static class Location { |
| 87 | + @Schema(description = "위치 이름", example = "강남역") |
| 88 | + private String name; |
| 89 | + |
| 90 | + @Schema(description = "경도", example = "127.0276") |
| 91 | + private Double lon; |
| 92 | + |
| 93 | + @Schema(description = "위도", example = "37.4979") |
| 94 | + private Double lat; |
| 95 | + } |
| 96 | + |
| 97 | + @Getter |
| 98 | + @Builder |
| 99 | + @NoArgsConstructor |
| 100 | + @AllArgsConstructor |
| 101 | + @JsonInclude(JsonInclude.Include.NON_NULL) |
| 102 | + @Schema(description = "경로 선형 정보") |
| 103 | + public static class PassShape { |
| 104 | + @Schema(description = "경로 선형 (지도 그리기용)", example = "LINESTRING(127.0276 37.4979, 127.0286 37.4989)") |
| 105 | + private String linestring; |
| 106 | + } |
| 107 | + |
| 108 | + @Getter |
| 109 | + @Builder |
| 110 | + @NoArgsConstructor |
| 111 | + @AllArgsConstructor |
| 112 | + @JsonInclude(JsonInclude.Include.NON_NULL) |
| 113 | + @Schema(description = "요금 정보") |
| 114 | + public static class Fare { |
| 115 | + @Schema(description = "총 요금 (원) - 도보는 0원, 대중교통은 합산금액, 자동차는 택시 + 톨게이트비", example = "1500") |
| 116 | + private Integer totalFare; |
| 117 | + |
| 118 | + @Schema(description = "택시 요금 (원) - 선택적", example = "10000") |
| 119 | + private Integer taxi; |
| 120 | + |
| 121 | + @Schema(description = "톨게이트 요금 (원) - 선택적", example = "2500") |
| 122 | + private Integer toll; |
| 123 | + } |
| 124 | +} |
| 125 | + |
0 commit comments