From cdf4363c6799fe3bed2f1913797e6643c03fcc22 Mon Sep 17 00:00:00 2001 From: BeommoKoo-dev <95630007+BeommoKoo-dev@users.noreply.github.com> Date: Sat, 18 Nov 2023 01:05:52 +0900 Subject: [PATCH] =?UTF-8?q?NABI-257--refactor=20:=20cardStatus=20=ED=95=84?= =?UTF-8?q?=EB=93=9C=EB=AA=85=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../card/dto/request/CardStatusUpdateRequestDTO.java | 4 ++-- .../card/dto/response/CardDetailResponseDTO.java | 11 +++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/main/java/org/prgrms/nabimarketbe/domain/card/dto/request/CardStatusUpdateRequestDTO.java b/src/main/java/org/prgrms/nabimarketbe/domain/card/dto/request/CardStatusUpdateRequestDTO.java index 8dc97fba..1ab9f3bb 100644 --- a/src/main/java/org/prgrms/nabimarketbe/domain/card/dto/request/CardStatusUpdateRequestDTO.java +++ b/src/main/java/org/prgrms/nabimarketbe/domain/card/dto/request/CardStatusUpdateRequestDTO.java @@ -4,7 +4,7 @@ import org.prgrms.nabimarketbe.global.annotation.ValidEnum; public record CardStatusUpdateRequestDTO( - @ValidEnum(enumClass = CardStatus.class, message = "유효하지 않은 상태입니다.") - CardStatus cardStatus + @ValidEnum(enumClass = CardStatus.class, message = "유효하지 않은 상태입니다.") + CardStatus status ) { } diff --git a/src/main/java/org/prgrms/nabimarketbe/domain/card/dto/response/CardDetailResponseDTO.java b/src/main/java/org/prgrms/nabimarketbe/domain/card/dto/response/CardDetailResponseDTO.java index b8fc47f8..96c0e8f5 100644 --- a/src/main/java/org/prgrms/nabimarketbe/domain/card/dto/response/CardDetailResponseDTO.java +++ b/src/main/java/org/prgrms/nabimarketbe/domain/card/dto/response/CardDetailResponseDTO.java @@ -1,8 +1,6 @@ package org.prgrms.nabimarketbe.domain.card.dto.response; -import java.time.LocalDateTime; -import java.util.List; - +import lombok.Builder; import org.prgrms.nabimarketbe.domain.card.entity.Card; import org.prgrms.nabimarketbe.domain.card.entity.CardStatus; import org.prgrms.nabimarketbe.domain.card.entity.TradeType; @@ -11,7 +9,8 @@ import org.prgrms.nabimarketbe.domain.category.entity.CategoryEnum; import org.prgrms.nabimarketbe.domain.item.entity.PriceRange; -import lombok.Builder; +import java.time.LocalDateTime; +import java.util.List; @Builder public record CardDetailResponseDTO( @@ -26,7 +25,7 @@ public record CardDetailResponseDTO( Integer viewCount, PriceRange priceRange, String content, - CardStatus cardStatus, + CardStatus status, TradeType tradeType, String tradeArea, Integer dibCount, @@ -50,7 +49,7 @@ public static CardDetailResponseDTO of( .viewCount(card.getViewCount()) .priceRange(card.getItem().getPriceRange()) .content(card.getContent()) - .cardStatus(card.getStatus()) + .status(card.getStatus()) .tradeType(card.getTradeType()) .tradeArea(card.getTradeArea()) .dibCount(card.getDibCount())