diff --git a/backend/product/src/main/java/org/samtuap/inong/domain/product/dto/AllPackageListResponse.java b/backend/product/src/main/java/org/samtuap/inong/domain/product/dto/AllPackageListResponse.java index d51baf94..5d9ad8a5 100644 --- a/backend/product/src/main/java/org/samtuap/inong/domain/product/dto/AllPackageListResponse.java +++ b/backend/product/src/main/java/org/samtuap/inong/domain/product/dto/AllPackageListResponse.java @@ -4,6 +4,8 @@ import lombok.Builder; import org.samtuap.inong.domain.product.entity.PackageProduct; +import java.time.LocalDateTime; + @Builder public record AllPackageListResponse(@NotNull Long id, @NotNull String packageName, @@ -13,7 +15,8 @@ public record AllPackageListResponse(@NotNull Long id, @NotNull Long price, Long discountId, Integer discount, - boolean discountActive + boolean discountActive, + LocalDateTime createdAt ) { public static AllPackageListResponse fromEntity(PackageProduct product, String imageUrl, Long orderCount, Integer discount, boolean discountActive){ return AllPackageListResponse.builder() @@ -26,6 +29,7 @@ public static AllPackageListResponse fromEntity(PackageProduct product, String i .discountId(product.getDiscountId()) .discount(discount) .discountActive(discountActive) + .createdAt(product.getCreatedAt()) .build(); } } diff --git a/backend/product/src/main/java/org/samtuap/inong/domain/product/dto/TopPackageGetResponse.java b/backend/product/src/main/java/org/samtuap/inong/domain/product/dto/TopPackageGetResponse.java index 2913b670..f36791ec 100644 --- a/backend/product/src/main/java/org/samtuap/inong/domain/product/dto/TopPackageGetResponse.java +++ b/backend/product/src/main/java/org/samtuap/inong/domain/product/dto/TopPackageGetResponse.java @@ -5,6 +5,8 @@ import org.samtuap.inong.domain.discount.entity.Discount; import org.samtuap.inong.domain.product.entity.PackageProduct; +import java.time.LocalDateTime; + @Builder public record TopPackageGetResponse(@NotNull Long id, @NotNull String packageName, @@ -16,7 +18,8 @@ public record TopPackageGetResponse(@NotNull Long id, @NotNull Integer deliveryCycle, Long discountId, Integer discount, - boolean discountActive) { + boolean discountActive, + LocalDateTime createdAt) { public static TopPackageGetResponse fromEntity(PackageProduct packageProduct, String thumbnailUrl, Long orderCount, Integer discount, boolean discountActive) { return TopPackageGetResponse.builder() @@ -31,6 +34,7 @@ public static TopPackageGetResponse fromEntity(PackageProduct packageProduct, St .discountId(packageProduct.getDiscountId()) .discount(discount) .discountActive(discountActive) + .createdAt(packageProduct.getCreatedAt()) .build(); }