Skip to content

Commit

Permalink
feat: ResponseProductComparisonTargetDto에 safetyScore 필드 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
kjungw1025 committed Oct 29, 2024
1 parent 9827e54 commit 5b329f4
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ public class ResponseProductComparisonTargetDto {
@Schema(description = "청약 마감일", example = "2024-06-21")
private final LocalDate subscriptionEndDate;

public ResponseProductComparisonTargetDto(Product product) {
@Schema(description = "AI가 판단한 상품 안전도", example = "0.89")
private final BigDecimal safetyScore;

public ResponseProductComparisonTargetDto(Product product, BigDecimal safetyScore) {
this.id = product.getId();
this.issuer = product.getIssuer();
this.name = product.getName();
Expand All @@ -59,5 +62,6 @@ public ResponseProductComparisonTargetDto(Product product) {
this.maximumLossRate = product.getMaximumLossRate();
this.subscriptionStartDate = product.getSubscriptionStartDate();
this.subscriptionEndDate = product.getSubscriptionEndDate();
this.safetyScore = safetyScore;
}
}

0 comments on commit 5b329f4

Please sign in to comment.