-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: 시험 차량 예약 순위 기능 추가 * feat: 시험장 예약 순위 기능 추가 * test: 순위 조회 메서드 테스트 추가
- Loading branch information
Showing
17 changed files
with
267 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...main/java/com/testcar/car/domains/carReservation/model/CarReservationRankingResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.testcar.car.domains.carReservation.model; | ||
|
||
|
||
import com.testcar.car.domains.carReservation.model.vo.CarReservationCountVo; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
@Builder | ||
public class CarReservationRankingResponse { | ||
@Schema(description = "차량명", example = "아반떼") | ||
private final String name; | ||
|
||
@Schema(description = "대여 횟수", example = "20") | ||
private final long count; | ||
|
||
public static CarReservationRankingResponse from(CarReservationCountVo carReservationCountVo) { | ||
return CarReservationRankingResponse.builder() | ||
.name(carReservationCountVo.getName()) | ||
.count(carReservationCountVo.getCount()) | ||
.build(); | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/main/java/com/testcar/car/domains/carReservation/model/vo/CarReservationCountVo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.testcar.car.domains.carReservation.model.vo; | ||
|
||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import java.util.Map.Entry; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
@Builder | ||
public class CarReservationCountVo { | ||
@Schema(description = "차량명", example = "아반떼") | ||
private String name; | ||
|
||
@Schema(description = "대여 횟수", example = "20") | ||
private long count; | ||
|
||
public static CarReservationCountVo from(Entry<String, Long> entry) { | ||
return CarReservationCountVo.builder().name(entry.getKey()).count(entry.getValue()).build(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
.../java/com/testcar/car/domains/trackReservation/model/TrackReservationRankingResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.testcar.car.domains.trackReservation.model; | ||
|
||
|
||
import com.testcar.car.domains.trackReservation.model.vo.TrackReservationCountVo; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
@Builder | ||
public class TrackReservationRankingResponse { | ||
@Schema(description = "시험장명", example = "직선주행장") | ||
private final String name; | ||
|
||
@Schema(description = "대여 횟수", example = "20") | ||
private final long count; | ||
|
||
public static TrackReservationRankingResponse from( | ||
TrackReservationCountVo trackReservationCountVo) { | ||
return TrackReservationRankingResponse.builder() | ||
.name(trackReservationCountVo.getName()) | ||
.count(trackReservationCountVo.getCount()) | ||
.build(); | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
src/main/java/com/testcar/car/domains/trackReservation/model/vo/TrackReservationCountVo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.testcar.car.domains.trackReservation.model.vo; | ||
|
||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import java.util.Map.Entry; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
@Builder | ||
public class TrackReservationCountVo { | ||
@Schema(description = "시험장명", example = "직선주행장") | ||
private String name; | ||
|
||
@Schema(description = "대여 횟수", example = "20") | ||
private long count; | ||
|
||
public static TrackReservationCountVo from(Entry<String, Long> entry) { | ||
return TrackReservationCountVo.builder() | ||
.name(entry.getKey()) | ||
.count(entry.getValue()) | ||
.build(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.