-
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.
Merge branch 'dev' of https://github.com/softeerbootcamp-2nd/A2-CarTag …
…into feat/footer
- Loading branch information
Showing
18 changed files
with
348 additions
and
25 deletions.
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
20 changes: 20 additions & 0 deletions
20
backend/src/main/java/autoever2/cartag/domain/car/TrimInfoDto.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,20 @@ | ||
package autoever2.cartag.domain.car; | ||
|
||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
|
||
@Getter @Setter | ||
@NoArgsConstructor | ||
public class TrimInfoDto { | ||
private int carId; | ||
private String trim; | ||
private int carDefaultPrice; | ||
@Builder | ||
public TrimInfoDto(int carId, String trim, int carDefaultPrice) { | ||
this.carId = carId; | ||
this.trim = trim; | ||
this.carDefaultPrice = carDefaultPrice; | ||
} | ||
} |
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
13 changes: 13 additions & 0 deletions
13
backend/src/main/java/autoever2/cartag/domain/option/QuoteSubOptionDto.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,13 @@ | ||
package autoever2.cartag.domain.option; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
@Getter @Setter | ||
public class QuoteSubOptionDto { | ||
private int optionId; | ||
private String optionName; | ||
private Long optionPrice; | ||
private String optionTitle; | ||
private String optionImage; | ||
} |
17 changes: 17 additions & 0 deletions
17
backend/src/main/java/autoever2/cartag/domain/share/QuoteIdList.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,17 @@ | ||
package autoever2.cartag.domain.share; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
@Getter @Setter | ||
public class QuoteIdList { | ||
private int carId; | ||
private int powerTrainId; | ||
private int bodyTypeId; | ||
private int operationId; | ||
private int outerColorId; | ||
private int innerColorId; | ||
private List<Integer> optionIdList = new ArrayList<>(); | ||
} |
121 changes: 121 additions & 0 deletions
121
backend/src/main/java/autoever2/cartag/domain/share/QuoteInfoDto.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,121 @@ | ||
package autoever2.cartag.domain.share; | ||
|
||
import autoever2.cartag.domain.car.TrimInfoDto; | ||
import autoever2.cartag.domain.color.InnerColorDto; | ||
import autoever2.cartag.domain.color.OuterColorDto; | ||
import autoever2.cartag.domain.model.ModelDefaultDto; | ||
import autoever2.cartag.domain.option.QuoteSubOptionDto; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
|
||
import java.util.List; | ||
|
||
@Getter | ||
@Builder | ||
public class QuoteInfoDto { | ||
@Schema(description = "car의 id") | ||
private int carId; | ||
@Schema(description = "차량의 trim명") | ||
private String trim; | ||
@Schema(description = "차량 기본 가격") | ||
private int carDefaultPrice; | ||
@Schema(description = "powerTrain의 id") | ||
private int powerTrainId; | ||
private String powerTrainTitle; | ||
@Schema(description = "기본 powerTrain의 이름", example = "디젤 2.2") | ||
private String powerTrainName; | ||
@Schema(description = "기본 powerTrain의 이미지 url") | ||
private String powerTrainImage; | ||
@Schema(description = "기본 powerTrain의 가격") | ||
private Long powerTrainPrice; | ||
|
||
@Schema(description = "bodyType의 id") | ||
private int bodyTypeId; | ||
@Schema(description = "bodyType 명") | ||
private String bodyTypeTitle; | ||
@Schema(description = "기본 bodyType의 이름", example = "7인승") | ||
private String bodyTypeName; | ||
@Schema(description = "기본 bodyType의 이미지 url") | ||
private String bodyTypeImage; | ||
@Schema(description = "기본 bodyType의 가격") | ||
private Long bodyTypePrice; | ||
|
||
@Schema(description = "operation의 id") | ||
private int operationId; | ||
@Schema(description = "operation 명") | ||
private String operationTitle; | ||
@Schema(description = "기본 operation의 이름", example = "2WD") | ||
private String operationName; | ||
@Schema(description = "기본 operation의 이미지 url") | ||
private String operationImage; | ||
@Schema(description = "기본 operation의 가격") | ||
private Long operationPrice; | ||
|
||
@Schema(description = "외장색상의 id") | ||
private int colorOuterId; | ||
@Schema(description = "기본 외장색상 이미지 url") | ||
private String colorOuterImage; | ||
@Schema(description = "기본 외장색상이 적용된 차량 url") | ||
private String colorCarOuterImage; | ||
@Schema(description = "기본 외장색상 가격") | ||
private Long colorOuterPrice; | ||
@Schema(description = "기본 외장색상 이름") | ||
private String colorOuterImageName; | ||
@Schema(description = "외장색상 명") | ||
private String colorOuterTitle; | ||
|
||
|
||
@Schema(description = "내장색상의 id") | ||
private int colorInnerId; | ||
@Schema(description = "기본 내장색상 이미지 url") | ||
private String colorInnerImage; | ||
@Schema(description = "기본 내장색상이 적용된 차량 url") | ||
private String colorCarInnerImage; | ||
@Schema(description = "기본 내장색상 가격") | ||
private Long colorInnerPrice; | ||
@Schema(description = "기본 내장색상 이름") | ||
private String colorInnerImageName; | ||
@Schema(description = "내장색상 명") | ||
private String colorInnerTitle; | ||
@Schema(description = "option들의 리스트") | ||
List<QuoteSubOptionDto> optionList; | ||
|
||
public static QuoteInfoDto toInfoDto(TrimInfoDto trimInfoDto, OuterColorDto outerColorDto, InnerColorDto innerColorDto, | ||
List<ModelDefaultDto> modelDefaultDto, List<QuoteSubOptionDto> optionInfos, String colorCarOuterImage) { | ||
return QuoteInfoDto.builder() | ||
.carId(trimInfoDto.getCarId()) | ||
.trim(trimInfoDto.getTrim()) | ||
.carDefaultPrice(trimInfoDto.getCarDefaultPrice()) | ||
.powerTrainId(modelDefaultDto.get(0).getModelId()) | ||
.powerTrainName(modelDefaultDto.get(0).getModelName()) | ||
.powerTrainImage(modelDefaultDto.get(0).getModelImage()) | ||
.powerTrainPrice(modelDefaultDto.get(0).getModelPrice()) | ||
.powerTrainTitle(modelDefaultDto.get(0).getModelTitle()) | ||
.operationId(modelDefaultDto.get(1).getModelId()) | ||
.operationName(modelDefaultDto.get(1).getModelName()) | ||
.operationImage(modelDefaultDto.get(1).getModelImage()) | ||
.operationPrice(modelDefaultDto.get(1).getModelPrice()) | ||
.operationTitle(modelDefaultDto.get(1).getModelTitle()) | ||
.bodyTypeId(modelDefaultDto.get(2).getModelId()) | ||
.bodyTypeName(modelDefaultDto.get(2).getModelName()) | ||
.bodyTypeImage(modelDefaultDto.get(2).getModelImage()) | ||
.bodyTypePrice(modelDefaultDto.get(2).getModelPrice()) | ||
.bodyTypeTitle(modelDefaultDto.get(2).getModelTitle()) | ||
.colorOuterId(outerColorDto.getColorId()) | ||
.colorOuterImage(outerColorDto.getColorImage()) | ||
.colorCarOuterImage(colorCarOuterImage) | ||
.colorOuterPrice(outerColorDto.getColorPrice()) | ||
.colorOuterImageName(outerColorDto.getColorName()) | ||
.colorOuterTitle("외장 색상") | ||
.colorInnerTitle("내장 색상") | ||
.colorInnerId(innerColorDto.getColorId()) | ||
.colorInnerImage(innerColorDto.getColorImage()) | ||
.colorCarInnerImage(innerColorDto.getColorCarImage()) | ||
.colorInnerPrice(innerColorDto.getColorPrice()) | ||
.colorInnerImageName(innerColorDto.getColorName()) | ||
.optionList(optionInfos) | ||
.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
Oops, something went wrong.