Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,26 @@ public record CreateDispatchReq(
@NotBlank(message = "출발지가 입력되지 않았습니다.")
String startLocation, // 출발지

@Schema(description = "출발지 위도", example = "37.5547125")
@NotNull(message = "출발지 위도가 입력되지 않았습니다.")
double startLatitude,

@Schema(description = "출발지 경도", example = "37.5547125")
@NotNull(message = "출발지 경도가 입력되지 않았습니다.")
double startLongitude,

@Schema(description = "도착지", example = "강원도")
@NotBlank(message = "도착지가 입력되지 않았습니다.")
String destinationLocation, // 도착지

@Schema(description = "도착지 위도", example = "37.5547125")
@NotNull(message = "도착지 위도가 입력되지 않았습니다.")
double destinationLatitude,

@Schema(description = "도착지 경도", example = "37.5547125")
@NotNull(message = "도착지 경도가 입력되지 않았습니다.")
double destinationLongitude,

@Schema(description = "요금", example = "100000")
@NotNull(message = "요금이 입력되지 않았습니다.")
Integer charge, // 요금
Expand Down Expand Up @@ -48,7 +64,11 @@ public record CreateDispatchReq(
public Dispatch toEntity() {
return Dispatch.builder()
.startLocation(this.startLocation())
.startLatitude(this.startLatitude())
.startLongitude(this.startLongitude())
.destinationLocation(this.destinationLocation())
.destinationLatitude(this.destinationLatitude())
.destinationLongitude(this.destinationLongitude())
.charge(this.charge())
.clientPhoneNumber(this.clientPhoneNumber())
.status(StatusType.OPEN)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,21 @@ public record UpdateDispatchReq(
@Schema(description = "출발지", example = "서울 강남구")
String startLocation,

@Schema(description = "출발지 위도", example = "37.5547125")
double startLatitude,

@Schema(description = "출발지 경도", example = "37.5547125")
double startLongitude,

@Schema(description = "도착지", example = "경기 성남시")
String destinationLocation,

@Schema(description = "도착지 위도", example = "37.5547125")
double destinationLatitude,

@Schema(description = "도착지 경도", example = "37.5547125")
double destinationLongitude,

@Schema(description = "요금", example = "20000")
Integer charge,

Expand Down
Loading