Skip to content

Commit

Permalink
Merge pull request #162 from CoolPeace-yanolza/feature/coupon/syncup
Browse files Browse the repository at this point in the history
쿠폰 도메인 싱크업
  • Loading branch information
tkddn204 authored Jan 22, 2024
2 parents 36492a2 + 0c91683 commit 0d960f7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import com.coolpeace.domain.accommodation.entity.Accommodation;
import com.coolpeace.domain.coupon.entity.Coupon;
import com.coolpeace.global.common.DayOfWeekUtil;

import java.time.LocalDate;
import java.util.List;
Expand All @@ -18,7 +17,7 @@ public record CouponResponse(
String customerType,
String couponRoomType,
Integer minimumReservationPrice,
List<String> couponUseConditionDays,
String couponUseConditionDays,
LocalDate exposureStartDate,
LocalDate exposureEndDate,
Integer couponExpiration,
Expand All @@ -40,7 +39,7 @@ public static CouponResponse from(Coupon coupon) {
coupon.getCustomerType().getValue(),
coupon.getCouponRoomType().getValue(),
coupon.getMinimumReservationPrice(),
DayOfWeekUtil.fromDayOfWeeks(coupon.getCouponUseConditionDays()),
coupon.getCouponUseDays().getValue(),
coupon.getExposureStartDate(),
coupon.getExposureEndDate(),
coupon.getCouponExpiration(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ void searchCoupon_success() throws Exception {
fieldWithPath("content[].customer_type").type(JsonFieldType.STRING).description("고객의 유형"),
fieldWithPath("content[].coupon_room_type").type(JsonFieldType.STRING).description("객실의 유형"),
fieldWithPath("content[].minimum_reservation_price").type(JsonFieldType.NUMBER).description("최소 예약 가격"),
fieldWithPath("content[].coupon_use_condition_days").type(JsonFieldType.ARRAY).description("쿠폰 사용 가능 요일"),
fieldWithPath("content[].coupon_use_condition_days").type(JsonFieldType.STRING).description("쿠폰 사용 가능 요일"),
fieldWithPath("content[].exposure_start_date").type(JsonFieldType.STRING).description("노출 시작 날짜"),
fieldWithPath("content[].exposure_end_date").type(JsonFieldType.STRING).description("노출 종료 날짜"),
fieldWithPath("content[].coupon_expiration").type(JsonFieldType.NUMBER).description("쿠폰 만료 일자"),
Expand Down Expand Up @@ -268,7 +268,7 @@ void getCouponRecentHistory_success() throws Exception {
fieldWithPath("[].customer_type").type(JsonFieldType.STRING).description("고객의 유형"),
fieldWithPath("[].coupon_room_type").type(JsonFieldType.STRING).description("객실의 유형"),
fieldWithPath("[].minimum_reservation_price").type(JsonFieldType.NUMBER).description("최소 예약 가격"),
fieldWithPath("[].coupon_use_condition_days").type(JsonFieldType.ARRAY).description("쿠폰 사용 가능 요일"),
fieldWithPath("[].coupon_use_condition_days").type(JsonFieldType.STRING).description("쿠폰 사용 가능 요일"),
fieldWithPath("[].exposure_start_date").type(JsonFieldType.STRING).description("노출 시작 날짜"),
fieldWithPath("[].exposure_end_date").type(JsonFieldType.STRING).description("노출 종료 날짜"),
fieldWithPath("[].coupon_expiration").type(JsonFieldType.NUMBER).description("쿠폰 만료 일자"),
Expand Down Expand Up @@ -341,7 +341,7 @@ void getCouponByCouponNumber_success() throws Exception {
fieldWithPath("customer_type").type(JsonFieldType.STRING).description("고객의 유형"),
fieldWithPath("coupon_room_type").type(JsonFieldType.STRING).description("객실의 유형"),
fieldWithPath("minimum_reservation_price").type(JsonFieldType.NUMBER).description("최소 예약 가격"),
fieldWithPath("coupon_use_condition_days").type(JsonFieldType.ARRAY).description("쿠폰 사용 가능 요일"),
fieldWithPath("coupon_use_condition_days").type(JsonFieldType.STRING).description("쿠폰 사용 가능 요일"),
fieldWithPath("exposure_start_date").type(JsonFieldType.STRING).description("노출 시작 날짜"),
fieldWithPath("exposure_end_date").type(JsonFieldType.STRING).description("노출 종료 날짜"),
fieldWithPath("coupon_expiration").type(JsonFieldType.NUMBER).description("쿠폰 만료 일자"),
Expand Down

0 comments on commit 0d960f7

Please sign in to comment.