diff --git a/src/main/java/com/groom/swipo/domain/payment/dto/response/PaymentPageResponse.java b/src/main/java/com/groom/swipo/domain/payment/dto/response/PaymentPageResponse.java index b1e7fea..16df73a 100644 --- a/src/main/java/com/groom/swipo/domain/payment/dto/response/PaymentPageResponse.java +++ b/src/main/java/com/groom/swipo/domain/payment/dto/response/PaymentPageResponse.java @@ -10,13 +10,15 @@ public record PaymentPageResponse( Integer totalPoint, Integer totalPay, - Integer percent + Integer percent, + String customImage ) { public static PaymentPageResponse of(Card card, User user, Store store) { return PaymentPageResponse.builder() .totalPoint(card.getTotalPoint()) .totalPay(user.getPay().getTotalPay()) .percent(store.getPercent()) + .customImage(card.getCustomImage()) .build(); } } diff --git a/src/main/java/com/groom/swipo/domain/payment/entity/Pay.java b/src/main/java/com/groom/swipo/domain/payment/entity/Pay.java index 3099bef..ee54cce 100644 --- a/src/main/java/com/groom/swipo/domain/payment/entity/Pay.java +++ b/src/main/java/com/groom/swipo/domain/payment/entity/Pay.java @@ -37,7 +37,7 @@ public class Pay extends BaseEntity { private Integer totalPay; // 유저 id - @OneToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL, orphanRemoval = true) + @OneToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL) @JoinColumn(name = "user_id") private User user; diff --git a/src/main/java/com/groom/swipo/domain/user/entity/User.java b/src/main/java/com/groom/swipo/domain/user/entity/User.java index 6018ab7..248f8dd 100644 --- a/src/main/java/com/groom/swipo/domain/user/entity/User.java +++ b/src/main/java/com/groom/swipo/domain/user/entity/User.java @@ -98,7 +98,7 @@ public class User extends BaseEntity { private List Cards = new ArrayList<>(); // 페이 - @OneToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL, orphanRemoval = true) + @OneToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL) @JoinColumn(name = "pay_id") private Pay pay;